std::locale breakage on MacOS 10.6 with LANG=en_US.UTF-8

后端 未结 5 2294
你的背包
你的背包 2020-12-06 01:12

I have a C++ application that I am porting to MacOSX (specifically, 10.6). The app makes heavy use of the C++ standard library and boost. I recently observed some breakage i

5条回答
  •  鱼传尺愫
    2020-12-06 01:53

    The situation is still the same. But some functionality may be gained by

    setlocale( LC_ALL, "" );
    

    This gets you UTF-8 coding on wide iostreams but not money formatting, for my two data points.

    locale::global( locale( "" ) );
    

    should be equivalent, but it crashes if subsequently run in the very same program.

提交回复
热议问题