Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:121837 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 49656 invoked from network); 28 Nov 2023 23:46:57 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 28 Nov 2023 23:46:57 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 5E7B318002B for ; Tue, 28 Nov 2023 15:47:04 -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=-3.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,DMARC_PASS,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=4.0.0 X-Spam-Virus: No X-Envelope-From: Received: from mail-wr1-f49.google.com (mail-wr1-f49.google.com [209.85.221.49]) (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 15:47:03 -0800 (PST) Received: by mail-wr1-f49.google.com with SMTP id ffacd0b85a97d-3316d09c645so4223788f8f.0 for ; Tue, 28 Nov 2023 15:46:56 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1701215215; x=1701820015; darn=lists.php.net; h=content-transfer-encoding:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=A/0eENS6O/uJtOGGiCVuaK9KCtJ47kOjJ/DpWRR0750=; b=lZZh0gCj+f2AA6a/PyusDA8znLb8jckJ31reqsm7JsrOfx6CKfwcsVf+QDpDYZqpdu 7fDVvLJPuXUGI/2BHTIOFKw1eoGT40OwfHQPCFiCQ48Qk66tkBA5lyvU+CuDyVlGsdvS TP6nZRwQgpU9ze9hLELGcgfaT3JfdQsa/BWpWwqDffhDzWMKm3xYu6iMEFQKPpGOJ3/Q hnGherZmIo86+DxFMwXauEwKyrG6yBTYttm5JfH9YYR1myScdmVGHf/a1aVWZBUWc0uU mfb4sEl5gYPYdd9DaNlBEjhYflb0GyBBA/aLDJZAKco/yC+9s1FeR1Bv8UQvop82qyNx cqzg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1701215215; x=1701820015; h=content-transfer-encoding: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=A/0eENS6O/uJtOGGiCVuaK9KCtJ47kOjJ/DpWRR0750=; b=Wr4EQyIAs9xDrAakODUdvN7eTcOotQxnM4+F57BGYpEszoyeqbKP+6FxAvtb7GofCM 16s3q3w+frO+jcykGwRGKE/KcTvZVcje2sOm33bEo5MMpzUwjFgICQbkfwTUV8EsIcau ZcEP9qzt+oYqmPAWNvD2vfEXn6tUDx+wx6+9upfHFLFMCHlph5wcJsvyDPNJjvC3/svC skCakyiRKzsa8Ji/xT7v1bbVsTtx1bgtyVlUfl16iLdEmyOJ8sptb5m6o3lN90dFerMk ami5DudQ4eCo6FNCcWYLwKeSeGhXAXd+4yH3tPP7uZyBl6TiRH2G4d0SpfIaur7FQQW1 VbMA== X-Gm-Message-State: AOJu0YyVUAKe66H8LaVpkcuZiEyUCwuXerNX19LbMs1+KyT3Wakzy3RV AVXGCwkwrAlHNptUOnaaNu3Vbuv+0FZZC+1m3d+7RbZ1cw== X-Google-Smtp-Source: AGHT+IHG4shSGmgZRnYFuJYhSUjF6Wp0XqfSYuxTZ9dqKNQjpWJHsx+SIAp9XFQRUDRYLxbPUWCMw03aNRF09aiLp30= X-Received: by 2002:a5d:46c1:0:b0:333:1077:b35c with SMTP id g1-20020a5d46c1000000b003331077b35cmr2532414wrs.47.1701215214818; Tue, 28 Nov 2023 15:46:54 -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 08:46:43 +0900 Message-ID: To: 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: youkidearitai@gmail.com (youkidearitai) 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 BOM > 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 problem= . For example is below: $val =3D "=E8=A1=A8"; // =E8=A1=A8 is 0x955c, script see 0x5c22, therefore,= Throw on Parse Error Please see about 5c problem https://blog.kano.ac/archive/posts/1654_5c-prob= lem/ I would like to maintain backwards compatibility. zend_encoding seems can't delete. Regards Yuya --=20 --------------------------- Yuya Hamada (tekimen) - https://tekitoh-memdhoi.info - https://github.com/youkidearitai -----------------------------