Generally it's not considered to be a good idea to use iso-2022-jp encoding in your script because the scanner doesn't accept control codes in a string literal that is used to form shift sequences, and iso-2022-jp encoded strings may contain escape characters '\', which causes unexpected results.
You can modify the scanner rules in Zend/zend_language_scanner.l and avoid those warnings indeed, but it won't help you write portable scripts. The current ZendEngine offers a limited support for multibyte encodings to solve such issues that can be enabled by specifying --enable-zend-multibyte option in configure, but it doesn't support any stateful encodings yet. (Though I'd like to see it fully supported) If you want to handle multibyte characters, you can use EUC-JP, Shift_JIS, or UTF-8 and convert the strings to the iso-2022-jp encoded ones either by mb_convert_encoding() or iconv() function whenever necessary. Or it is not enough ?? :) Moriyoshi "Adrian Gartland" <[EMAIL PROTECTED]> wrote: > When using iso-2022-jp encoded strings within the I have to > resort to doing error_reporting = ~E_COMPILE_WARNING > to avoid getting a million > > Warning: Unexpected character in input: '' (ASCII=27) state=2 in > > in the page. > iso-2022-jp uses escape characters go in and out of JIS > charsets. Compile warnining are pretty important for development. > Are there are less drastic ways of allowing the escape character > through? > > As an example of its use, it goes something along the lines > of > <? > $asTokenStrings["LANG:AGENDA:LONG_DAYNAME_MON"] = "ascii-like-text here >ESC$B7nMKF|ESC(B ascii-like-text-here"; > > echo $asTokenStrings["LANG:AGENDA:LONG_DAYNAME_MON"]; > ?> > > > -- > Adrian Gartland - Senior Systems Engineer - TV Portal Team > Oregan Networks UK Ltd Tel: +44 (0) 20 8846 0990 > The White Building, 52-54 Glentham Road Fax: +44 (0) 20 8646 0999 > Barnes, London. SW13 9JJ, United Kingdom WWW: http://www.oregan.net/ -- PHP Development Mailing List <http://www.php.net/> To unsubscribe, visit: http://www.php.net/unsub.php