
29 Oct
2011
29 Oct
'11
5:34 p.m.
Alf P. Steinbach wrote:
int main() { _setmode( _fileno( stdout ), _O_U16TEXT ); ::wprintf( L"\uFEFF" L"Blåbærsyltetøy! 日本国 кошка!\n" ); }
This produces an UTF-16 text file though. It works with "type", but would probably confuse most other programs. And more. C:\Projects\testbed>release\testbed.exe > testbed.txt C:\Projects\testbed>type testbed.txt Blåbærsyltetøy! 日本国 кошка! C:\Projects\testbed>type testbed.txt | more Blåbærsyltetoy! ??? ?????! C:\Projects\testbed>cat testbed.txt ▒▒B l ▒ b ▒ r s y l t e t ▒ y ! ▒e,g▒V :♦>♦H♦:♦0♦!