[Dlang-study] [rcstring] Defining rcstring

Walter Bright walter at digitalmars.com
Sat Feb 6 14:28:59 PST 2016


On 2/2/2016 8:46 PM, Михаил Страшун wrote:
 > When it comes to encoding, there is also issue of how lacking is current 
support of non-UTF encodings in Phobos.

This is a deliberate choice. Phobos is designed so that UTF is the only encoding 
supported. Other encodings are expected to:

    other => toUTF => usePhobos => toOther

i.e. translate to UTF, do the processing, and then translate back to whatever 
encoding is desired.

I have experience with other encodings, like Shift-JIS. May they all burn in 
hell. If you think that people forgetting they are dealing with UTF being a 
problem, imagine all the other encodings, and their peculiar weirdnesses that 
**** up every piece of code that is not explicitly set up to handle them.



More information about the Dlang-study mailing list