New file with utf-8 and unix

General and specific configuration/INI settings

New file with utf-8 and unix

Postby ChrSchulze » Fri Apr 24, 2009 6:27 am

I would like all my files in utf-8 encoding and unix have. Even if I like a new file. Is that possible. if so, how!
ChrSchulze
Newbie
 
Posts: 2
Joined: Wed Apr 22, 2009 10:21 am

Re: New file with UTF-8 and Unix

Postby Mofi » Sat Apr 25, 2009 10:33 am

For UltraEdit v16.00 and later versions:

Open Advanced - Configuration and

select Create new files as UTF-8 at Editor - New File Creation,
select Unix at File Handling - DOS/UNIX/MAC Handling - Default file type for new files,
configure the UTF-8 BOM settings like you want it at File Handling - Save.

Close the configuration dialog with button OK and that's it.

For UltraEdit v15.20 and previous versions:

Open Advanced - Configuration and

enable Editor - New File Creation - Create new files as Unicode,
select Unix at File Handling - DOS/UNIX/MAC Handling - Default file type for new files and
select Disable for UNIX/MAC file detection/conversion in the same configuration dialog,
enable File Handling - Conversions - On Paste convert line endings to destination type (UNIX/MAC/DOS),
configure the UTF-8 BOM settings like you want it at File Handling - Save.

Close the configuration dialog with button OK.

On first save of a new file with the Save As dialog, select for Format either UTF-8 or UTF-8 NO BOM. This setting is remembered and always used when saving a file with Save As as it is done for new files, even from within macros or scripts. As long as you do not change this setting your new files are created as Unicode UTF-16 LE files with Unix line endings and are converted to UTF-8 on first save.


But in my point of view it is better to work on Windows with DOS line endings and not with Unix line endings. That makes finds/replaces with line endings, macros, scripts and text exchange via Windows clipboard with other applications easier. If your files are normally not very large and you work with temporary files, it would be better to select DOS for Default file type for new files and specify in the Save As dialog Unix as line terminator. This setting is also remembered and therefore all your new files are converted to use Unix line endings on first save. Additionally you have to select Automatically convert to DOS format for UNIX/MAC file detection/conversion and enable also Save file as input format (UNIX/MAC/DOS). Now all your Unix files are automatically converted to DOS on file load and converted back to Unix on file save. That gives you 100% compatibility with all the other Windows applications.
User avatar
Mofi
Grand Master
Grand Master
 
Posts: 4055
Joined: Thu Jul 29, 2004 11:00 pm
Location: Vienna

Re: New file with utf-8 and unix

Postby ChrSchulze » Mon Apr 27, 2009 10:50 am

Thanks for the help.
ChrSchulze
Newbie
 
Posts: 2
Joined: Wed Apr 22, 2009 10:21 am


Return to Configuration/INI Settings