Why the hell doesn't foreach decode strings

Timon Gehr timon.gehr at gmx.ch
Fri Oct 21 11:39:43 PDT 2011

On 10/20/2011 09:37 PM, Martin Nowak wrote:
> It just took me over one hour to find out the unthinkable.
> foreach(c; str) will deduce c to immutable(char) and doesn't care about
> unicode.
> Now there is so many unicode transcoding happening in the language

In the standard library. Not in the language.

> that it starts to get annoying,
> but the most basic string iteration doesn't support it by default?

I actually like the current behaviour.

More information about the Digitalmars-d mailing list