> > AFAIK in perl, if you include unicode characters in a string it'll
> > set the utf8 flag. If you don't include any unicode characters (eg. 7
> > bit ascii, or raw bytes) the flag won't be set. So given a perl
> > scalar that doesn't contain any utf8 characters, you don't know if
> > its a textual string (str16) or a binary string (vbin). There is a
> > is_utf8_string function, but that'll only tell you if the string
> > would be valid utf8, but it could be a binary string that happens to
> > be valid utf8, so that's not really safe.
>
> You can explicitly mark it as utf8 using utf8::upgrade() though, right? 
> Certainly I tried that in a simple test and the property in question was 
> then sent as str16.

Yes, if I as a user had a string that was textual, I could call utf8::upgrade() 
to ensure it got sent as str16. I guess this is similar in concept to calling 
setEncoding in C++, although maybe less natural in a dynamically typed language.

Jimmy

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@qpid.apache.org
For additional commands, e-mail: dev-h...@qpid.apache.org

Reply via email to