php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #80325 contradictory definitions with endian-ness
Submitted: 2020-11-05 23:17 UTC Modified: 2020-12-18 16:15 UTC
From: nedelcescuradu at gmail dot com Assigned:
Status: Verified Package: mbstring related
PHP Version: 7.4.12 OS: -
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: nedelcescuradu at gmail dot com
New email:
PHP Version: OS:

 

 [2020-11-05 23:17 UTC] nedelcescuradu at gmail dot com
Description:
------------
---
From manual page: https://php.net/mbstring.encodings
---


Quote:
ISO-10646-UCS-2 UCS-2 In contrast to UCS-2, strings are always assumed to be in BIG endian form.

ISO-10646-UCS-2 UCS-2 In contrast to UCS-2, strings are always assumed to be in LITTLE endian form.

ISO-10646-UCS-2 has 3 definitions, different one from another


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2020-11-05 23:24 UTC] requinix@php.net
-Summary: contradictory definition +Summary: contradictory definitions with endian-ness -Status: Open +Status: Verified -Package: Documentation problem +Package: mbstring related
 [2020-11-05 23:24 UTC] requinix@php.net
I only just did a cursory reading of the source, but in the case of UCS-2, what the table needs to say is:

* "UCS-2" comes with byte-order detection
* "ISO-10646-UCS-2" and "UCS2" (and "UNICODE") are aliases for "UCS-2"
* "UCS-2BE" is always big-endian
* "UCS-2LE" is always little-endian

The whole table on that page is just screwy.
 [2020-12-18 16:15 UTC] cmb@php.net
> The whole table on that page is just screwy.

Plus has quite some overlap with
<https://www.php.net/manual/en/mbstring.supported-encodings.php>.
 [2023-01-03 06:27 UTC] kimialamo9881 at gmail dot com
That was so amazing. 

(https://www.myinsite.biz/)github.com
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat Dec 21 15:01:29 2024 UTC