Do you have access to a project actually using Shift_JIS? Interesting!
I thought they were practically unicorns / non-existent running PHP4,

Can you run
```
var_dump(array(
    "biao_hex" => bin2hex("表"),
    "zend.multibyte" => ini_get("zend.multibyte"),
    "zend.script_encoding" => ini_get("zend.script_encoding"),
    "zend.detect_unicode" => ini_get("zend.detect_unicode"),
    "mbstring.internal_encoding" => ini_get("mbstring.internal_encoding"),
    "mbstring.func_overload" => ini_get("mbstring.func_overload"),
    "PHP_VERSION" => PHP_VERSION,
));
```
there? What do you get?

On Wed, 29 Nov 2023 at 00:47, youkidearitai <youkideari...@gmail.com> wrote:
>
> 2023年11月29日(水) 8:07 Hans Henrik Bergan <divinit...@gmail.com>:
> >
> > @youkidearitai right now the code specifically deals with
> > - UTF8: removing UTF8 BOM and removing `declare(encoding='UTF-8');
> > - UTF16LE/UTF16BE/UTF32LE/UTF32BE: converting to UTF8 removing the BOM
> > and removing declare(encoding='...')
> > - ISO-8859-1: converting to UTF-8 and removing
> > declare(encoding='ISO-8859-1'), i couldn't really find information on
> > a ISO-8859-1 BOM, so to the best of my knowledge it does not exist
> >
> > it does not deal with any other encodings as of writing, but more can
> > be added if needed.
> >
>
> Hi, Hans
>
> I see. I understand the argument.
> At least, Japanese character encoding seems not using declare(encoding=...).
>
> Probably, we use zend_encoding implicitly.
> If delete zend_encoding, In SJIS (Shift_JIS) probably will occur 5c problem.
>
> For example is below:
>
> $val = "表"; // 表 is 0x955c, script see 0x5c22, therefore, Throw on Parse Error
>
> Please see about 5c problem 
> https://blog.kano.ac/archive/posts/1654_5c-problem/
>
> I would like to maintain backwards compatibility. zend_encoding seems
> can't delete.
>
> Regards
> Yuya
>
> --
> ---------------------------
> Yuya Hamada (tekimen)
> - https://tekitoh-memdhoi.info
> - https://github.com/youkidearitai
> -----------------------------
>
> --
> PHP Internals - PHP Runtime Development Mailing List
> To unsubscribe, visit: https://www.php.net/unsub.php
>

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

Reply via email to