Hi Wu,

  Now I'm closer to understand what's going on. But I still need to dig
deeper.

  The files you sent are not in UTF-8, right? You did not converted to
UTF-8, you just converted the representation from ANSI to hexadecimal.
(ignoring the comments in the files)

  Although being harmless, it turns maintenance of these strings more
difficult. I wouldn't like that.

  Reading the documentation in the Microsoft link you sent, another
possibility is to write in the beginning of the file:

#ifdef _MSC_VER
#pragma setlocale(“.1252”)
#endif

  At least for Visual C++.

  This solves the problem for you?

Best,
Scuri





Em qua, 18 de jul de 2018 às 00:28, 云风 Cloud Wu <clou...@gmail.com>
escreveu:

> sur-behoffski <sur_behoff...@grouse.com.au>于2018年7月18日周三 上午11:15写道:
>
>>
>> So, could you please help explain to a non-MS-OS person like myself
>> about how UTF-8 is a poor cousin to UTF-16 in Microsoft operating
>> systems?
>>
>>
> I guess Andrew Robinson mean if we encode 'µ' in source by UTF-8 (It will
> be 2 bytes in the source file), some old version of msvc can't recognize it
> as '\xB5'. But using Latin-1 code page ( µ is only one byte in source file)
> is friendly to compiler.
>
> But the issue is that some compiler in none cp2512 locale would count <µ'>
> as one double length character : B5 27, and raise an error when compile.
>
> My solution is using escape character '\xB5' directly rather than 'µ'.
>
>
>
>
> ------------------------------------------------------------------------------
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
> _______________________________________________
> Iup-users mailing list
> Iup-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/iup-users
>
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Iup-users mailing list
Iup-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/iup-users

Reply via email to