TDPL: Foreach over Unicode string

Kagamin spam at here.lot
Fri Jul 30 08:29:00 PDT 2010


Shin Fujishiro Wrote:

> By the way, which CP should be used for redirected stdio: ANSI or OEM?
> I thought ANSI was preferred, but OEM seems to be more commonly used
> for console apps.

I think, they just don't care and write text as usual. C standard was created with implication that strings are in system codepage and no transcoding is ever mentioned, it's a language for ASCII text.

There is even problem when program code is edited in a gui editor and saved in ANSI codepage, after compilation hardcoded strings are not transcoded and remain in ANSI codepage, printf just writes text blindly, so the output is broken.


More information about the Digitalmars-d mailing list