Re: byte to char safe?

2009-07-30 Thread Daniel Keep
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 yo

Re: byte to char safe?

2009-07-30 Thread Daniel Keep
Harry wrote: > Again hello, > > char[6] t = r"again" ~ cast(char)7 ~ r"hello"; > > use only own write functions > is ok? > > thank you! I think a more significant problem is that "again\x07hello" can't possibly fit in six characters, unless you're using some crazy numbering system I'm not fa

Re: byte to char safe?

2009-07-30 Thread Harry
Ary Borenszweig Wrote: > Harry escribió: > > Again hello, > > > > char[6] t = r"again" ~ cast(char)7 ~ r"hello"; > > If you want the result to be "again7hello", then no. You must do: > > char[6] t = r"again" ~ '7' ~ r"hello"; > > or: > > char[6] t = r"again" ~ (cast(char)('0' + 7)) ~ r"hello

Re: byte to char safe?

2009-07-30 Thread Ary Borenszweig
Harry escribió: Again hello, char[6] t = r"again" ~ cast(char)7 ~ r"hello"; If you want the result to be "again7hello", then no. You must do: char[6] t = r"again" ~ '7' ~ r"hello"; or: char[6] t = r"again" ~ (cast(char)('0' + 7)) ~ r"hello";

Re: byte to char safe?

2009-07-30 Thread Harry
BCS Wrote: > Reply to Harry, > > > Again hello, > > > > char[6] t = r"again" ~ cast(char)7 ~ r"hello"; > > > > use only own write functions > > is ok? > > thank you! > > > > I think this will also work and you can be shure it's safe. > > r"again" ~ '\x07' ~ r"hello" > > again thank you !

Re: byte to char safe?

2009-07-30 Thread BCS
Reply to Harry, Again hello, char[6] t = r"again" ~ cast(char)7 ~ r"hello"; use only own write functions is ok? thank you! I think this will also work and you can be shure it's safe. r"again" ~ '\x07' ~ r"hello"

byte to char safe?

2009-07-30 Thread Harry
Again hello, char[6] t = r"again" ~ cast(char)7 ~ r"hello"; use only own write functions is ok? thank you!