Am 10.05.2018 um 00:20 schrieb Alan Cox:
> On Tue, 8 May 2018 13:50:07 +0200
> Philipp Klaus Krause <p...@spth.de> wrote:
> 
>> I intend to add functions to the standard library in SDCC for easier
>> conversion of strings between UTF-8 (the multibyte encoding SDCC uses)
>> and UTF-16 (the encoding SDCC uses for char16_t).
> 
> UTF-16 or UCS-2 ?

UTF-16.

> 
> I think it makes sense to have them but I'm not actually likely to use
> them as the Unixlike world uses UTF-8 for pretty much everything because
> UTF-16 uses more space and is a mess (endianness and still variable
> length) while UTF-8 has ASCII as a subset so all the Unixlike stuff 'just
> works'. So if anything I'd be adding UTF-8 support to stuff.
> 
> Alan
> 

We already support UTF-8. Is there any UTF-8 functionality you miss in SDCC?

The idea for the new functions is: You can do all your internal string
processing in UTF-8. Then, when interfacing with something that requires
UTF-16, you use the new functions for conversion between UTF-8 and UTF-16.

Philipp

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Sdcc-user mailing list
Sdcc-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sdcc-user

Reply via email to