Your question can't be really answered as it depends on which file types you work most with.
First read the IDM power tip
Working with Unicode in UltraEdit/UEStudio and the Wikipedia article about
character encoding. I added lots of links to my text below. You should follow them and carefully read the referenced pages.
HTML, XHTML and XML files are very often encoded with UTF-8 without
byte order mark (BOM). Those files contain at top a
charset declaration (HTML and XHTML) respectively
encoding declaration (XML). UltraEdit recognizes those declarations and opens UTF-8 encoded files without BOM as Unicode file if the declaration can be found in first 64 KB of file on using UltraEdit for Windows < v24.10 or UEStudio < v17.10.
To create by default new files with UTF-8 encoding without the 3 bytes of byte order mark added on first save, the settings
- Write UTF-8 BOM header to all UTF-8 files when saved
- Write UTF-8 BOM on new files created within this program (if above is not set)
must be both unchecked at
Advanced - Configuration - File Handling - Save. And of course in Save As dialog opened on first save
Default or
UTF-8 - NO BOM must be selected for encoding/format to save the new file really as UTF-8 encoded file without BOM.
A UTF-8 encoded file without appropriate declaration, without BOM and without any character with a code value greater 127 is binary equal to same file encoded for example with Windows-1252. So a text editor can't determine the encoding wanted by the user for this file in this case. So be careful on using UTF-8 encoding by default for all type of text files if using it without BOM.
Batch files require a completely different character encoding than other text files. The reason is the usage of OEM character set in console windows. Open a command prompt window, enter
chcp, hit key RETURN or ENTER and you see which code page is used by default in console window according to your Windows language configuration. Typical in Western European and North American countries are
code page 850 and
code page 437 which encodes the characters in upper half of the table (code value greater 127) completely different to very common code page
Windows-1252 usually used for single byte encoded text files on Windows. So batch files are not Unicode files, but files with just 1 byte per character (= maximum of 256 different characters) using by default a code page usually not used anymore for text files.
This is one reason why I have a separate configuration for files with extension
bat or
cmd. After creating a new file (ANSI, Windows-1252), I save it first with file extension
bat before doing anything else if I want to create a new batch file. This results in an immediate change of font, font size and used encoding as
OEM Character Set feature of UltraEdit is automatically enabled for this file. Also the tab stop and indent values are automatically set now for batch file editing (4 spaces per tab). Now I can write comments and text output by the batch file to console window or into a file via redirection using characters in upper half of the character table (mainly German characters like äöüÄÖÜß) and UltraEdit automatically inserts them into the batch file with code value according to code page 850 instead of Windows-1252 as all other non Unicode files opened in same instance of UltraEdit still use.
Are you interest in special configuration for batch files?
Yes, read
Different font depending on file extension. It is also advisable having command
OEM Character Set in a customized toolbar (follow the link at bottom of referenced topic). I don't need to click on this command to enable
OEM Character Set for batch files as automatically enabled for *.bat and *.cmd because of my configuration. But it is very good to have this command in toolbar to see if
OEM Character Set is currently enabled for active file.