V Tue, 13 Jan 2015 12:32:15 +0000
"Nordlöw" via Digitalmars-d-learn <digitalmars-d-learn@puremagic.com>
napsáno:

> I get
> 
>      core.exception.UnicodeException@src/rt/util/utf.d(290):
> 
> in a call to
> 
>      std.string.tr(x, `_`, ` `)
> 
> for a badly encode string x. Is it really needed to do 
> auto-decoding here?
> 
> Isn't the encoding of underscore and space uniquely one by byte 
> in UTF-8?
> 
> What do I need to do/add to avoid auto-decoding here?

std.array.replace(x, `_`, ` `);

Reply via email to