Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:121839 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 54235 invoked from network); 29 Nov 2023 00:16:36 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 29 Nov 2023 00:16:36 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 8C08918002F for ; Tue, 28 Nov 2023 16:16:42 -0800 (PST) X-Spam-Checker-Version: SpamAssassin 4.0.0 (2022-12-13) on php-smtp4.php.net X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,DMARC_PASS, FREEMAIL_ENVFROM_END_DIGIT,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=4.0.0 X-Spam-Virus: No X-Envelope-From: Received: from mail-ot1-f54.google.com (mail-ot1-f54.google.com [209.85.210.54]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by php-smtp4.php.net (Postfix) with ESMTPS for ; Tue, 28 Nov 2023 16:16:42 -0800 (PST) Received: by mail-ot1-f54.google.com with SMTP id 46e09a7af769-6d816bb0a61so2214660a34.1 for ; Tue, 28 Nov 2023 16:16:34 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1701216993; x=1701821793; darn=lists.php.net; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=Whexto/h3B7a4XxpiyZVv3l3CD8nGxYM8Bx76XZe/04=; b=N9O1eFy8CtLT43EyOVs6IaZyYJmgglIq3vwKi3WODj3/RhHcrPQxdKP88Hhf0mv9+V M7/UcFibCHXEkEWuO1d6XnY3d10wc/e5yv17weVTAJXpUij8WMNwna1uDJHpExPtjK58 9Dj4Fcz87zPASsAi//RD9kFTpeWIIaV9Or5s/A8w0q9chi2oS+3140R+Padg5Ph3j1G9 qGftxCdDUk/VDV6EKEyZkTMCf52FLFHeh0y9xGo40b3dS7OGOXfr9FUnR6+OWIREHRGo PnoOr+4U24RsSCOd1b36UdXA87FkBycrYEwcDN54ucexbrJwxW0gUkpZwhq3bTwVbnkb qWZQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1701216993; x=1701821793; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=Whexto/h3B7a4XxpiyZVv3l3CD8nGxYM8Bx76XZe/04=; b=JfNEcJhW72gLgWvcvQhVq+LID5iRO7coM8vtb2Zo0FwWZBB6EhJFSo8PjNN2PYImkd ADink/rwF2/d9R2PxEl/eEFtJ91sW6ri2yZUMsJ4BoWFTX5mH0XMA6TVN6lY7ai1V1SB hC+XD4Nc/QMlzc4RAP9vLQS435lUdu5FlWt0StHFmo7NHJrpX4GEPes1SLoBUgUSEXIs 2X3OiWvbx7b0UCuXLbaqIcbu0Xp2gLzHWa6hiAlpnv4gvzY1cscMK6u2dTWiRyD4IOup HSP0reWUTm1IJtQ1CQzDLS028SaAoLxnvZGSZmG1kT5FbPP7pYM9EGfC3jQP/XjM1idA QuhQ== X-Gm-Message-State: AOJu0YwRHVmzqu/AsEDXjLEVWxtN8ssJ/QNpi8rFYXFwsCXcnxWKRU8J Obi9SNxBTs1iGwtcpVgEzczz9dRzWqDtjNWMQco8bBxF7GCesQ== X-Google-Smtp-Source: AGHT+IGK6f+GbnHAlUBVTUlqy5vvDHwo081Rf2KPKwfia4RUnCYnHlgFvDZY/ZspjoKxfku8R1jKxh0HgLdzGxPSobA= X-Received: by 2002:a05:6870:9114:b0:1fa:3c59:55a1 with SMTP id o20-20020a056870911400b001fa3c5955a1mr10962172oae.37.1701216993556; Tue, 28 Nov 2023 16:16:33 -0800 (PST) MIME-Version: 1.0 References: <1BA05C1A-AFAE-4E86-BAA2-420B22549519@gmail.com> <0D8856BC-DDEE-47F8-8C59-7F4DC7A64237@woofle.net> In-Reply-To: Date: Wed, 29 Nov 2023 01:15:58 +0100 Message-ID: To: youkidearitai Cc: internals@lists.php.net Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Subject: Re: [PHP-DEV] Deprecate declare(encoding='...') + zend.multibyte + zend.script_encoding + zend.detect_unicode ? From: divinity76@gmail.com (Hans Henrik Bergan) actually scratch that, run ``` var_dump(array( "biao_hex" =3D> bin2hex("=E8=A1=A8"), "zend.multibyte" =3D> ini_get("zend.multibyte"), "zend.script_encoding" =3D> ini_get("zend.script_encoding"), "zend.detect_unicode" =3D> ini_get("zend.detect_unicode"), "mbstring.internal_encoding" =3D> ini_get("mbstring.internal_encoding")= , "mbstring.func_overload" =3D> ini_get("mbstring.func_overload"), "PHP_VERSION" =3D> PHP_VERSION, "raw_script_bytes" =3D> bin2hex(file_get_contents(__FILE__)), )); ``` what do you get? On Wed, 29 Nov 2023 at 01:04, Hans Henrik Bergan wro= te: > > 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" =3D> bin2hex("=E8=A1=A8"), > "zend.multibyte" =3D> ini_get("zend.multibyte"), > "zend.script_encoding" =3D> ini_get("zend.script_encoding"), > "zend.detect_unicode" =3D> ini_get("zend.detect_unicode"), > "mbstring.internal_encoding" =3D> ini_get("mbstring.internal_encoding= "), > "mbstring.func_overload" =3D> ini_get("mbstring.func_overload"), > "PHP_VERSION" =3D> PHP_VERSION, > )); > ``` > there? What do you get? > > On Wed, 29 Nov 2023 at 00:47, youkidearitai wro= te: > > > > 2023=E5=B9=B411=E6=9C=8829=E6=97=A5(=E6=B0=B4) 8:07 Hans Henrik Bergan = : > > > > > > @youkidearitai right now the code specifically deals with > > > - UTF8: removing UTF8 BOM and removing `declare(encoding=3D'UTF-8'); > > > - UTF16LE/UTF16BE/UTF32LE/UTF32BE: converting to UTF8 removing the BO= M > > > and removing declare(encoding=3D'...') > > > - ISO-8859-1: converting to UTF-8 and removing > > > declare(encoding=3D'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= =3D...). > > > > Probably, we use zend_encoding implicitly. > > If delete zend_encoding, In SJIS (Shift_JIS) probably will occur 5c pro= blem. > > > > For example is below: > > > > $val =3D "=E8=A1=A8"; // =E8=A1=A8 is 0x955c, script see 0x5c22, theref= ore, 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 > >