ord(), chr(), and &url.asciitbale.com;

From: Date: Sun, 10 Jun 2018 17:59:48 +0000
Subject: ord(), chr(), and &url.asciitbale.com;
Groups: php.doc 
Request: Send a blank email to phpdoc+get-969386966@lists.php.net to get a copy of this message
Hi all, I'd like to raise a discussion of the patch I've just proposed at https://edit.php.net/?patchID=2939&project=PHP because it's a relatively major change. Currently, the ord() and chr() manual pages describe their input and output in terms of "ASCII" and "characters", which is misleading for a number of reasons: 1) ASCII is a 7-bit encoding, but these functions work with 8-bit numbers (0 to 255) 2) The term "character" is often used in the context of multibyte encodings, but these functions *always* work with a single byte 3) Neither function is encoding aware in any way, and both can in fact be used on arbitrary binary strings In the patch linked above, I've had a go at completely rewording these manual pages to make this clearer. Unfortunately, the "preview" function in the online editor doesn't work for me, so I may have made some formatting errors, but I'd also like feedback on the proposed wording. Finally, both pages currently link to http://www.asciitable.com which has a reasonable table for ASCII values, and then one labelled "extended ASCII", which appears to be the top half of DOS Code Page 437, of all things. I think this should be replaced with a more suitable link, but I'm not sure where to; Wikipedia has good charts of encodings, for instance, but what page would we link to? ASCII, ISO-8859-1, Windows 1252, something else? Any opinions welcome. Regards, -- Rowan Collins [IMSoP]

« previous php.doc (#969386966) next »