Doc #63079 [Asn->Csd]: String access by character is not multibyte-safe

From: Date: Wed, 14 Nov 2012 02:10:42 +0000
Subject: Doc #63079 [Asn->Csd]: String access by character is not multibyte-safe
References: 1  Groups: php.doc.bugs 
Request: Send a blank email to doc-bugs+get-9119@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=63079&edit=1 ID: 63079 Updated by: aharvey@php.net Reported by: astatutov at gmail dot com Summary: String access by character is not multibyte-safe -Status: Assigned +Status: Closed Type: Documentation Problem Package: Documentation problem PHP Version: Irrelevant Assigned To: aharvey Block user comment: N Private report: N New Comment: This bug has been fixed in the documentation's XML sources. Since the online and downloadable versions of the documentation need some time to get updated, we would like to ask you to be a bit patient. Thank you for the report, and for helping us make our documentation better. Previous Comments: ------------------------------------------------------------------------ [2012-11-14 02:10:38] aharvey@php.net Automatic comment from SVN on behalf of aharvey Revision: http://svn.php.net/viewvc/?view=revision&revision=328351 Log: Warn users about the perils of multi-byte strings and direct character access. Or, as xkcd put it today, if it starts pointing toward space you are having a bad problem and you will not go to space today. Fixes doc bug #63079 (String access by character is not multibyte-safe). ------------------------------------------------------------------------ [2012-11-14 02:03:37] aharvey@php.net It does say right at the top of the string type page that a character is a byte, but I'll add a warning to the character access section to be extra clear. ------------------------------------------------------------------------ [2012-11-13 10:49:20] Matti dot jarvinen at nitroid dot fi Under "String access and modification by character" at http://php.net/manual/en/language.types.string.php there is no mention about [] syntax not being multibyte safe. At least make this a documentation issue. ------------------------------------------------------------------------ [2012-09-13 19:27:35] astatutov at gmail dot com *mbstring* just determines which module will read this option. It doesn't say which module it will affect. Say, option mbstring.func_overload affects whole php, because it overrides native functions. Option mbstring.http_input changes default php behavior when reading HTTP-request and so on. So why can't mbstring.func_overload or, say, mbstring.op_overload override the string accessing operation? ------------------------------------------------------------------------ [2012-09-13 14:12:32] laruence@php.net as the option self said *mbstring*.internal_encoding, not php.internal_encoding... ------------------------------------------------------------------------ The remainder of the comments for this report are too long. To view the rest of the comments, please view the bug report online at https://bugs.php.net/bug.php?id=63079 -- Edit this bug report at https://bugs.php.net/bug.php?id=63079&edit=1

« previous php.doc.bugs (#9119) next »