[EMAIL PROTECTED] said:
> unpack('U*', $string) This expression is resulting in a null string if
> the string does not have any unicode characters.. How to avoid this
> situation.. 

If $string does not contain any unicode characters, what would you
expect/want "unpack('U*',$string)" to return?  It seems to me that a
null string would be the appropriate return value.  (Though maybe it 
would be handy to have some global status variable, like $@, to check 
for errors/failures.)

What situation do you actually want to avoid?  Do you need a way to test
whether $string contains unicode data before passing it to unpack?  Or
do you want unpack(U*,...) to do something other than return a null
string when you hand it non-unicode data?

        Dave Graff


Reply via email to