char[] + utf-8 + canFind == bug?

Andrea Fontana advmail at katamail.com
Tue Nov 22 08:38:36 PST 2011


I guess I should use wchar instead of char. :)

Il giorno mar, 22/11/2011 alle 10.31 -0600, Andrei Alexandrescu ha
scritto:

> On 11/22/11 10:28 AM, Andrea Fontana wrote:
> > I've some problems (again) with UTF-8. Try this code:
> >
> > char[] chars = ['à','è','ì'];
> 
> This will truncate the multi-byte characters. It should be a 
> compile-time error.
> 
> Andrei
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.puremagic.com/pipermail/digitalmars-d/attachments/20111122/969159ad/attachment.html>


More information about the Digitalmars-d mailing list