Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:121838 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 52027 invoked from network); 29 Nov 2023 00:04:56 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 29 Nov 2023 00:04:56 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id DA89C180031 for ; Tue, 28 Nov 2023 16:05:03 -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-oa1-f53.google.com (mail-oa1-f53.google.com [209.85.160.53]) (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:05:03 -0800 (PST) Received: by mail-oa1-f53.google.com with SMTP id 586e51a60fabf-1f5bd86ceb3so3556419fac.2 for ; Tue, 28 Nov 2023 16:04:55 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1701216295; x=1701821095; 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=hKdyNNOWCRzS3HuCupNSpBbN93UajTRDL6TNERPoOU4=; b=ZepEgKQ/BNtSrVJT/N/2UeFGQcfhnrKzWON7GA5SnBJncdvCs4pTQvIXC8JrHdsegr pDG+JOq/8pw5QvVo8+YocCiXV9qcd+z1AjZClzRJp2OWMW0U7gLG8xohmfHLiCYyYYJ1 raXnl7FCs4PMVVNGTmbHyYEfjoqcNwqK8CWAXWlKp73fsiKdI3IK4GAMcGwOiQxGvrL0 rsZrO603fCIa6q7O7Dvj+XX4Uw6bwSn7Y27wsXddZOsgUir3OzoujQoPkh3UaQIIi8sc AgSck37CLCRh6rkbQoXQ+tI1Eqwmd+ei7CCmZZb92jIsFkp/giPhQaU31VRG0W4MqgmP bcJQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1701216295; x=1701821095; 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=hKdyNNOWCRzS3HuCupNSpBbN93UajTRDL6TNERPoOU4=; b=boy4BANWDH1U6gDjFiqTxTn60UHxOXUInTwdzrv/MjWnoiPrSWLKoMiouSC1jW6fYl M8jdj+L2fHTmmMCtuRfx037qKkCsJl7/EVXtDJIi3k33gok6QZphEuK09FyRw7E8PW8i 43RJfqHKixw7ZcnSQaex5G4CrJ9fmXe3HlBjQrHKLjIGl0pkc7HTUKJvwXzQxUMJvBJ6 UByjapy1R5QaOCHrE4XwaC/VkqddcUp/E4q0ukh6HLwwQgC8BjwTD7ivS9mQUXZqvlaR fiW52f07PtuGeYOArIbpqL5hrw4IEnzXSTNYa6kox691wuKyquN1K0AbpS3N90TUFbjv nKCg== X-Gm-Message-State: AOJu0YyIwdQUOjb3ZoEbUdkidEGTCDBzvwrkFjxjAgII8otPrH2KrCKz lVyS0s98a6s2NDE3/GR6ScMJ2mf8vgYtK6ebpwUcJOYRCpXlmg== X-Google-Smtp-Source: AGHT+IF8wDSoEGr2o/DI/5DHzAa/cY/S916m+EhQWeNDqWw7j0F75QHC95fz27JFMSwKPJl2GRHOIyA80MbdujECcF8= X-Received: by 2002:a05:6871:e70f:b0:1fa:3d9:271c with SMTP id qa15-20020a056871e70f00b001fa03d9271cmr21641036oac.45.1701216295057; Tue, 28 Nov 2023 16:04:55 -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:04:19 +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) 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 wrote= : > > 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 probl= em. > > For example is below: > > $val =3D "=E8=A1=A8"; // =E8=A1=A8 is 0x955c, script see 0x5c22, therefor= e, Throw on Parse Error > > Please see about 5c problem https://blog.kano.ac/archive/posts/1654_5c-pr= oblem/ > > 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 >