Re: What is the use of "unicode.semantics" in PHP 6?

From: Date: Thu, 12 Jul 2007 04:14:25 +0000
Subject: Re: What is the use of "unicode.semantics" in PHP 6?
References: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16  Groups: php.internals 
Request: Send a blank email to internals+get-30830@lists.php.net to get a copy of this message
>>>>>> Unicode code points can be defined with \u, but PHP6 breaks >>>>>> existing octal and hex escape sequences. >>>> >>>> I don't understand what this means... >>> >>> I think I know... >>> >>> I have code like this, somewhere: >>> >>> if (preg_match("|[\xF0-\xFF]|", $data)){ >>> $data = un_microsuck($data); >>> } >>> >>> un_microsuck() basically detects and converts any of the goof-ball >>> extended ASCII from MS products (Word, Outlook, etc) to an HTML >>> equivalent character. >>> >>> But now \xF0 isn't going to be ASCII 128 anymore, is it? >> >> \xF0 never was ASCII. ASCII (ISO-646) is 7bit character set. \xF0 is >> decimal 240. It is 8bit. > > Don't tell me. > > Tell Microsoft. > > Cuz I sure as heck get a LOT of input data >> \x7f and I have to do > something reasonable with it... > > And I did say "extended ASCII" in the other paragraph, after all... > >>> Or maybe \xF0 will "work" but the octal \360 won't? >> >> Are you sure that you can't do that by setting >> unicode.something_encoding to iso-8859-1 or windows-1252? > > I dunno. > > Doesn't really matter if I can't set those in .htaccess, that's for sure. All unicode. settings except unicode.semantics are PHP_INI_ALL. From README.UNICODE ---- Script Encoding =============== ... If you cannot change the encoding system wide, you can use a pragma to override the INI setting in a local script: <?php declare(encoding = 'Shift-JIS'); ?> ---- -- Tomas

« previous php.internals (#30830) next »