Boost logo

Boost :

Subject: Re: [boost] Silly Boost.Locale default narrow string encoding inWindows
From: Peter Dimov (pdimov_at_[hidden])
Date: 2011-10-29 13:34:48


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♦!


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk