byte to char safe?

Daniel Keep daniel.keep.lists at gmail.com
Thu Jul 30 21:22:41 PDT 2009



Harry wrote:
> D writef not print utf8 control?

I have no idea what you're asking.  To take a blind stab: writef expects
any char[] you give it to be in utf8 format.  Actually, EVERYTHING
assumes that char[] is in utf8.

> \x00 .. \x1f and \x7f .. \x9f safe for data?

Again, I'm not sure what you're asking.  char[] is utf8, which means
that ANY code unit in the range \x80..\xff is invalid by itself.  If
you're storing binary data, use ubyte[].

> where \n \t?

const NEWLINE = "\n";

What's the issue?


More information about the Digitalmars-d-learn mailing list