chcp 10000
echo hell☺ w☻rld♥! >> "UTF-16 file☺☻♥♦♣♠"
OK, it creates correct file, but in the content there are question marks instead of unicode characters. How to fix it?
OK, it creates correct file, but in the content there are question marks instead of unicode characters. How to fix it? |
|||
|
|
|
I'm not sure what you are trying to do here, but that's not a Unicode code page. See http://msdn.microsoft.com/en-us/library/windows/desktop/dd317756%28v=vs.85%29.aspx.
I'm not sure why, but the Command Prompt seems to interpret them as control characters when pasted, specifically SOH (Start of Heading, 01), STX (Start of Text, 02) and ETX (End of Text, 03). On the plus side, PowerShell seems to handle this properly. Notepad++ opened the resultant text file as "UCS-2 Little Endian" automatically, and it displays the correct characters. Ok, I've figured out why UTF-8 wasn't working for me. The font should be set to Lucida Console, since the default Raster Fonts don't have Unicode support. |
|||||||||||
|