The Case Against Autodecode

Max Samukha via Digitalmars-d digitalmars-d at puremagic.com
Tue May 31 14:16:03 PDT 2016


On Tuesday, 31 May 2016 at 21:01:17 UTC, Andrei Alexandrescu 
wrote:

> If user code needs to go upper at the grapheme level, they can 
> If anything this thread strengthens my opinion that 
> autodecoding is a sweet spot. -- Andrei

Unicode FAQ disagrees (http://unicode.org/faq/utf_bom.html):

"Q: How about using UTF-32 interfaces in my APIs?

A: Except in some environments that store text as UTF-32 in 
memory, most Unicode APIs are using UTF-16. With UTF-16 APIs  the 
low level indexing is at the storage or code unit level, with 
higher-level mechanisms for graphemes or words specifying their 
boundaries in terms of the code units. This provides efficiency 
at the low levels, and the required functionality at the high 
levels."




More information about the Digitalmars-d mailing list