How to set byte order marker for Unicode files?

I know this is not a "real" programming issue. But this is due to programming, so I will configure it anyway. I have a program that I need to check that reads the byte byte marker of a file to find out if it is utf-8 or utf-16. My problem is that I cannot find a program / text editor that will allow me to set the byte order marker. Can someone tell me how to set this in a text file?

+3
source share
4 answers

There is a pretty good program called BabelPad . He will not only install the specification, I believe that it will also tell you if it is installed or not. You can also do this programmatically in .Net. There is a good FAQ about this on MSN .

+3
source

If you need to be absolutely sure what is happening, create the files in binary format, either using the binary hex editor or write it from the program.

+3
source
+2

Visual Studio.NET, .

Visual Studio. "" " ". .

You should be able to edit the hexadecimal values ​​at the beginning of the file to include any byte order pattern you need.

This Wikipedia article describes that you will need to set byte order markers for different file formats (UTF-8 or UTF -16 for example)

+1
source

Source: https://habr.com/ru/post/1698247/


All Articles