Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:118545 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 43238 invoked from network); 31 Aug 2022 19:21:05 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 31 Aug 2022 19:21:05 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 4C52D180084 for ; Wed, 31 Aug 2022 12:21:03 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on php-smtp4.php.net X-Spam-Level: *** X-Spam-Status: No, score=3.2 required=5.0 tests=BAYES_20, HEADER_FROM_DIFFERENT_DOMAINS,HTML_MESSAGE,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_SOFTFAIL,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.2 X-Spam-ASN: AS15169 209.85.128.0/17 X-Spam-Virus: No X-Envelope-From: Received: from mail-yb1-f182.google.com (mail-yb1-f182.google.com [209.85.219.182]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by php-smtp4.php.net (Postfix) with ESMTPS for ; Wed, 31 Aug 2022 12:21:02 -0700 (PDT) Received: by mail-yb1-f182.google.com with SMTP id t184so5594218yba.4 for ; Wed, 31 Aug 2022 12:21:02 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc; bh=O2xlcBr+wxqK6y5WrYHwDGxEKAhmRoa5d/no6K4F+3Y=; b=jQPWblYCOrdGPNsfC1Yd4w3XDpYwVeY+ZYJYJUGclk1pC5KxhkwcuPUeQzhoxqPUqW mcbe7zJSUTMqc0JNu5NPrbVOyDeNM2c5aWpbiCRMPZSr5tT5NpRPWhSS3Wt1sYRI80G1 Q0FLPrg8jAbXt8zhlCDTk+Rg5Ho78pxkdFyJLXsUsMimZmJ2+3vzzz6jrjgeuMr3KAr3 JtGME/NPDl4kvUc8BjkMYuUpkLpnJysNjViZoGQ33kl8f8SZpbfnA03tHrNOmM2+4/MX c6dWTDqWBZDQ7o6pWRNE+osr1Wgm062Syfd0S3Z4EXhufsi8ICp8LjLcoSEaJ+nlhSP6 x8/w== X-Gm-Message-State: ACgBeo3Vy/T0W5kTzhhFsLF3q4Hq/74dSiqLMNFnz2O8hK2Tv5htRl7h ObzeOOzJeTRwcDX6FOKNj5eI4iUz5OWC39lF/OB8iA== X-Google-Smtp-Source: AA6agR5ekEjWM96cIsVudTGHtfGEu5DSEJgc0UihC3vFotXbJVB3JuuypcU8j0fnuljJty6F9aLHpCCBGfc4LS/vguo= X-Received: by 2002:a25:e04b:0:b0:69a:ba15:cc86 with SMTP id x72-20020a25e04b000000b0069aba15cc86mr14625776ybg.39.1661973661447; Wed, 31 Aug 2022 12:21:01 -0700 (PDT) MIME-Version: 1.0 References: <00d044c6-8059-3487-ca3a-7881d4ca462a@gmx.de> In-Reply-To: <00d044c6-8059-3487-ca3a-7881d4ca462a@gmx.de> Date: Wed, 31 Aug 2022 14:20:51 -0500 Message-ID: To: "Christoph M. Becker" Cc: PHP internals Content-Type: multipart/alternative; boundary="000000000000b78c3105e78e65dc" Subject: Re: [PHP-DEV] No longer allow block mode for declare(encoding) From: pollita@php.net (Sara Golemon) --000000000000b78c3105e78e65dc Content-Type: text/plain; charset="UTF-8" On Wed, Aug 31, 2022 at 10:43 AM Christoph M. Becker wrote: > recently, there was a bug report regarding declare(encoding)[1]. I've > checked that, and found that the current implementation of > declare(encoding) doesn't make sense regarding "block mode", since this > is completely ignored; instead, each (allowed) declare(encoding) works > from where it is written till the next declare(encoding) (well, probably > more or less). > > Since I consider switching the character encoding in the middle of a > file not reasonable (and it might be hard to properly implement support > for that), I suggest to disallow block mode for declare(encoding) as of > PHP 8.3. A respective PR is available[2]. > > I think I can imagine scenarios where switching encodings within a file would.... work? Especially for ASCII transparent encodings... That said, if you're currently depending on multiple encodings in a single file then you probably deserve whatever you get. +1 -Sara --000000000000b78c3105e78e65dc--