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
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
MUST BE VALID
Solve the problem:
32 - 18 = ?
Subscribe to this entry?

 
 [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: Fri Oct 11 16:01:26 2024 UTC