Nicolas Bérard-Nault wrote:
> I have one specific example of where this can be a HUGE headache. Let's
> say you have some serialized configuration files, saved with
> unicode.semantics = 1, containing a single configuration array. Now, for
> some reason, the administrator decides to turn unicode.semantics = 0 and
> your configuration file does not work anymore. That's because
> $arr[(unicode) 'key'] and $arr[(binary) 'key'] are different. Hence, all
> the keys in the configuration array have to be explicitly accessed with
> either (binary) or (unicode).

You are going to have this problem with or without the Unicode switch
though.  Whenever you write a string to a file or socket and you don't
carry the actual encoding along with it, then you are completely at the
whim of the default configuration to try to determine which encoding
something is in.  If one PHP instance has its default encoding set to
Big-5 and another has it set to Shift-JIS you are going to have the
exact same problem.

-Rasmus

-- 
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to