php-src/Zend/tests/multibyte
Alex Dowad ad7e0f16cc Fix mbstring support for Shift-JIS
- Reject otherwise valid kuten codes which don't map to anything in JIS X 0208.
- Handle truncated multi-byte characters as an error.
- Convert Shift-JIS 0x7E to Unicode 0x203E (overline) as recommended by the
  Unicode Consortium, and as iconv does.
- Convert Shift-JIS 0x5C to Unicode 0xA5 (yen sign) as recommended by the
  Unicode Consortium, and as iconv does.
  (NOTE: This will affect PHP scripts which use an internal encoding of
  Shift-JIS! PHP assigns a special meaning to 0x5C, the backslash. For example,
  it is used for escapes in double-quoted strings. Mapping the Shift-JIS yen
  sign to the Unicode yen sign means the yen sign will not be usable for
  C escapes in double-quoted strings. Japanese PHP programmers who want to
  write their source code in Shift-JIS for some strange reason will have to
  use the JIS X 0208 backlash or 'REVERSE SOLIDUS' character for their C
  escapes.)
- Convert Unicode 0x5C (backslash) to Shift-JIS 0x815F (reverse solidus).
- Immediately handle error if first Shift-JIS byte is over 0xEF, rather than
  waiting to see the next byte. (Previously, the value used was 0xFC, which is
  the limit for the 2nd byte and not the 1st byte of a multi-byte character.)
- Don't allow 'control characters' to appear in the middle of a multi-byte
  character.

The test case for bug 47399 is now obsolete. That test assumed that a number
of Shift-JIS byte sequences which don't map to any character were 'valid'
(because the byte values were within the legal ranges).
2020-11-09 13:45:16 +02:00
..
bug68665.phpt Add many missing closing PHP tags to tests 2020-08-09 22:03:36 +02:00
multibyte_encoding_001.phpt Fix mbstring support for Shift-JIS 2020-11-09 13:45:16 +02:00
multibyte_encoding_002.phpt Remove useless skip check 2020-01-15 18:38:15 +01:00
multibyte_encoding_003.phpt UTF-16 text conversion handles truncated characters as illegal 2020-10-27 10:19:00 +02:00
multibyte_encoding_004.phpt Reindent phpt files 2020-02-03 22:52:20 +01:00
multibyte_encoding_005.phpt Reindent phpt files 2020-02-03 22:52:20 +01:00
multibyte_encoding_006.phpt Remove useless skip check 2020-01-15 18:38:15 +01:00