Re: Re: Regarding the latest patch on fgetcsv() (stable branch)
| From: | Moriyoshi Koizumi | Date: | Sat, 13 Dec 2003 02:27:02 +0000 |
| Subject: | Re: Re: Regarding the latest patch on fgetcsv() (stable branch) | ||
| References: | 1 2 3 4 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-6403@lists.php.net to get a copy of this message | ||
On 2003/12/13, at 11:12, Rasmus Lerdorf wrote:
On Sat, 13 Dec 2003, Moriyoshi Koizumi wrote:"Often" was slightly too emphasized a word indeed, but you can see a typical example on the PEAR package Net_DNS. No matter how substr() or its family are documented, it is very likely abused in many places on a common error that every character is mapped to a single byte. MoriyoshiOverloading is evil, because functions like substr() are often used to splice a certain length of octets byte-wise while mb_substr() treats the sequence of octets on a character-basis.I don't know about this happening often. In singlebyte apps I don't see this happening often. People splice on character boundaries. Perhaps in multibyte apps people are using substr this way, but that would seem to be an incorrect usage of the function. People who do this are taking advantage of a side-effect of a function designed for a different character set. substr as documented works on characters, not octets.