std.string and unicode

Frits van Bommel fvbommel at REMwOVExCAPSs.nl
Sat Dec 16 15:22:28 PST 2006


Todor Totev wrote:
> Hello all,
> are std.string functions supposed to be UNICODE aware?

Yes.

> The documentation says nothing and looking at the source it appears that
> the functions work only for ASCII characters, despite the fact that
> their arguments are char[].

In many cases UTF-8 or ASCII doesn't actually make a difference, so the 
code doesn't need to do anything special. IIRC that was in fact one of 
the design goals of UTF-8.
But if you find any functions that only work for ASCII, be sure to 
report them to the digitalmars.D.bugs newsgroup[1].
Make sure to test them first, though. In fact, include code that fails 
(but shouldn't).


[1]: The bugzilla seems to be down at the moment, otherwise that would 
have been preferred.



More information about the Digitalmars-d mailing list