How to place char* of stringZ to ubyte[]?

Nick Sabalausky SeeWebsiteToContactMe at semitwist.com
Tue Oct 30 02:46:03 PDT 2012


On Mon, 29 Oct 2012 19:50:57 +0100
"bearophile" <bearophileHUGS at lycos.com> wrote:

> denizzzka:
> 
> > I am trying to send to remote host utf8 text with zero byte at 
> > end (required by protocol)
> 
> What if your UTF8 string coming from D already contains several 
> zeros?
> 

If you need to send a string with an embedded null through a
null-terminated-string protocol, then you're pretty much screwed anyway.

FWIW ;)

('Course, the embedded nulls could be stripped if they're not actually
important.)


More information about the Digitalmars-d-learn mailing list