Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:128623 X-Original-To: internals@lists.php.net Delivered-To: internals@lists.php.net Received: from php-smtp4.php.net (php-smtp4.php.net [45.112.84.5]) by lists.php.net (Postfix) with ESMTPS id 753901A00BC for ; Thu, 4 Sep 2025 06:44:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=php.net; s=mail; t=1756968198; bh=/AX8QtpGrMyAKZbKdOHD4EOW7yj7B5cAAfahiA3uc/M=; h=From:Date:Subject:To:From; b=P4RlEGdnpEf9ubURMI2MioHXJ4Ygn5ysaQX6hmnilTyN4HqT9h26kyZi/BU6e1YMf Xqd7kkI2BOn1jRx8UNRlE9OXGXPAvwt/AtH7viGPexgdblkXVz/izEvDOSejZ+rYDR OJBDCxIsPDOTSmFakGEuiMSzrFiH5nI1RRcESP8JGkVXc1bKhyeYrVNYuvmelEMTbn H/fiA5tqSGUGBBkFzSSIKOp4vHoLiN7q1HlOjBhDxv61vh6AnM+pVWrEmwx87kL1ya 4NvgLZJUTFCXYizIqH3yuTlhRBr5+xZLpQS46IXr2JUo4LYC9orqF7fTVGKc9+Yced F07oHUX2ES1tw== Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 48DD818006E for ; Thu, 4 Sep 2025 06:43:18 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-25) on php-smtp4.php.net X-Spam-Level: X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,DMARC_PASS,FREEMAIL_FROM, HTML_MESSAGE,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.1 X-Spam-Virus: No X-Envelope-From: Received: from mail-pl1-f182.google.com (mail-pl1-f182.google.com [209.85.214.182]) (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 ; Thu, 4 Sep 2025 06:43:15 +0000 (UTC) Received: by mail-pl1-f182.google.com with SMTP id d9443c01a7336-24c9a399346so6283225ad.0 for ; Wed, 03 Sep 2025 23:44:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1756968283; x=1757573083; darn=lists.php.net; h=to:subject:message-id:date:from:mime-version:from:to:cc:subject :date:message-id:reply-to; bh=/AX8QtpGrMyAKZbKdOHD4EOW7yj7B5cAAfahiA3uc/M=; b=JaRxJFT9itZbCoMGQxA1cwim3U88bcSOyoiNmw7GX/+b6f7BrqoCdBFWRTRLKipQQj Spx0b8Ye1sOCkpjM1RhyEouAnfc02hHdIRn4Ft+IW8R3BllhODQjeH7lWJvMq2ZhxZgW 1KT4fOexPSfM0J9hBkY03ho/ZvMK/Jsgko7Fpbiq8xp5ge1CyI0NQNAppUSZOy6wb62t HUG20PwK+p9G+q3gKCcDq5VZeQeuLrvQ4QnI8eTvjKFDv9R7qEW2rpmlYKl6leDPBxtj uSW2rWfGqxIBXXvvxgiXXjG+knd7e+HriWCZQry8na1cg9akSdyq9hXdORDcmUtNDwrL AyEA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1756968283; x=1757573083; h=to:subject:message-id:date:from:mime-version:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=/AX8QtpGrMyAKZbKdOHD4EOW7yj7B5cAAfahiA3uc/M=; b=a/7nSKXpvpF8NqWMzy0mvJgnmEe3OHFR7w09jQAOG1jafMGFCr2TJ5CBwN6G/M0RA8 nhaCwGJh+MxNS609HxpSNeKtktsoNeyRVD50D0xNjh94zZZc9ZDisMkO5rshcq9gy39g /gBNByXYsqbnpmLtsUXWkcX3SGoh29vAhBDxl+JaITy/Efi+wXyAT4kOplnWa0cJ7BK/ 7JjSzcEaFHPBE/5nY/eHUUur/MAtDVM1F4vdQnZfyfU0rnwbYutmg85bHx90LDGxfUws ojzj8cQBMD1FkejO2tg+4nMJ0oNFs5hsXgOgMC62J5C+CKvJYGStdhi9037ceaLxH75S yPDg== X-Gm-Message-State: AOJu0YwNOAwVDr46jN+AS4AQJaNGMqO6NX+Me7M4cm7gUdX8GDQowYP0 RUIEaTVf4DEAoISjF8J8wrklLcC2wl4IKEaswAoYL7eOChDceIVjYrXfUkhfxFurJcw8P7gFKuK MmH5ek7HcLAAEj7OtTzT04lhnVjZWO9qhGamG X-Gm-Gg: ASbGncv8MVPwP6oIwjQCLb5xYiuo/RAWuQKkjrJJrRVg6yXt2UytWAD42nsxHfcHGfR twbKZnn31z1daVzwC09byMEMKn8XajoPiTzOa/zHldZms5jTkqkBEviO+iWNoZS2c9ajFFVTcY8 pgKmqhtrhlPCYwIFFd7fvEPAWTn8Pnu49Ul3B82j8H8ymt2EG7/Vr6YByLSxgDF9vLYx/YoyNBH ebbd36c X-Google-Smtp-Source: AGHT+IEQnL50CBbd6W8vayEQWnOEc0OWtIQG/QOIn3yVILrbGXOQ4nOJ2Lnl/0VvBYUkVVe2Wj4CodpYFMkGNv83qms= X-Received: by 2002:a17:903:234a:b0:248:cd0b:3426 with SMTP id d9443c01a7336-24944a460c6mr275038575ad.20.1756968282905; Wed, 03 Sep 2025 23:44:42 -0700 (PDT) Precedence: list list-help: list-post: List-Id: x-ms-reactions: disallow MIME-Version: 1.0 Date: Thu, 4 Sep 2025 08:44:31 +0200 X-Gm-Features: Ac12FXy5jebCS1oyWvsaZac5ATscRxvzLg6lokJZ515NQOcfr8xeKhy6wkoLpXU Message-ID: Subject: [PHP-DEV] mbstring/iconv encoding deprecation To: PHP internals Content-Type: multipart/alternative; boundary="000000000000626072063df40e67" From: jorg.sowa@gmail.com (Jorg Sowa) --000000000000626072063df40e67 Content-Type: text/plain; charset="UTF-8" Hello everyone, I'm writing regarding the deprecation of mbstring/iconv encoding that was voted on more than 10 years ago. RFC: https://wiki.php.net/rfc/default_encoding It was accepted that following INI settings were deprecated: "iconv.input_encoding (Default: php.input_encoding) iconv.internal_encoding (Default: php.internal_encoding) iconv.output_encoding (Default: php.output_encoding) mbstring.http_input (Default: php.input_encoding) mbstring.internal_encoding (Default: php.internal_encoding) mbstring.http_output" + enigmatic "all functions that take encoding option use php.internal_encoding as default (e.g. htmlentities/mb_strlen/mb_regex/etc)" Without INI values following functions are becoming pointless: - iconv_set_encoding - iconv_set_encoding - mb_internal_encoding - mb_http_output Function `mb_http_input` would likely require separate RFC. PRs[1] deprecating INI settings are already waiting for next major PHP update, but the problem is with proper deprecation phase of those values. There wasn't any since 5.6. So the decision of removal of those INI may be controversial for now. My suggestion is to properly deprecate all the INI settings + functions using them before 9.0. The question is, does it require additional RFC, or this may already have consensus, given the formal deprecation was agreed upon 10 years ago, however without specified rules how it will be achieved? Kind regards, Jorg [1] https://github.com/php/php-src/pull/12445 --000000000000626072063df40e67 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hello everyone,
I'= m writing regarding the deprecation of mbstring/iconv encoding that was vot= ed on more than 10 years ago.


It was accepted that followin= g INI settings were deprecated:
"iconv.input_encodi= ng (Default: php.input_encoding)
iconv.internal_encoding (Default: php.internal_encoding)
iconv.output_encoding (Default: php.output_encoding)
mbstring.http_input (Default: php.input_encoding)
mbstring.internal_encoding (Default: php.internal_encoding)
mbstring.http_output"
+ enigmatic "all functions = that take encoding option use php.internal_encoding as default (e.g. htmlen= tities/mb_strlen/mb_regex/etc)"

Without INI values f= ollowing functions are becoming pointless:
- iconv_set_encoding
- ico= nv_set_encoding
- mb_internal_encoding
- mb_http_output

Functi= on `mb_http_input` would likely require separate RFC.

<= div>PRs[1] deprecating INI settings are already waiting for next major PHP = update, but the problem is with proper deprecation phase of those values. T= here wasn't any since 5.6. So the decision of removal of those INI may = be controversial for now.

My suggestion is to properly de= precate all the INI settings=C2=A0+ functions using them before 9.0. The qu= estion is, does it require additional RFC, or this may already have consens= us, given the formal deprecation was agreed upon 10 years ago, however with= out specified rules how it will be achieved?

Kind regards= ,
Jorg


[1] https://github.com/php/php-src/pull/12445
--000000000000626072063df40e67--