[php-src] PR #20604: Add GB18030-2022 to default encoding list for CN

From: Date: Fri, 28 Nov 2025 02:38:07 +0000
Subject: [php-src] PR #20604: Add GB18030-2022 to default encoding list for CN
Groups: php.git-pulls 
Request: Send a blank email to git-pulls+get-34160@lists.php.net to get a copy of this message
Pull Request: https://github.com/php/php-src/pull/20604 Author: HeRaNO GB18030-2022 is the current official standard, superseding the previous 2005 and 2000 versions. It is essential for modern Chinese text processing for the following reasons: 1. Superset Relationship: GB18030 is a strict superset of CP936 (GBK) and EUC-CN (GB2312). Using GB18030 as the detection target covers all characters in these older encodings while enabling support for a much wider range of characters. 2. Extended Character Coverage: The 2022 standard includes significant updates, covering over 87,000 characters. It adds support for CJK Extensions (C, D, E, F, G) and updates mappings for rare characters that were previously mapped to the Private Use Area (PUA) in the 2005 version. This is critical for correctly handling names containing rare characters (e.g., in banking or government data). 3. Backward Compatibility: It is safe to promote GB18030-2022 as the preferred encoding. Files encoded in EUC-CN or CP936 are valid GB18030 streams. This PR adds GB18030-2022 to the default encoding list for CN.

« previous php.git-pulls (#34160) next »