Re: multi-byte awareness for formatted_print.c
| From: | Zeev Suraski | Date: | Wed, 10 Oct 2001 13:22:34 +0000 |
| Subject: | Re: multi-byte awareness for formatted_print.c | ||
| References: | 1 2 | Groups: | php.dev |
| Request: | Send a blank email to php-dev+get-67687@lists.php.net to get a copy of this message | ||
<warning>
I wasn't following this thread, just an out-of-context comment
</warning>
At 15:04 10-10-01, Wez Furlong wrote:
On 09/10/01, "Stig Sæther Bakken" <ssb@alltheweb.com> wrote:That shouldn't be a problem. str++ advances the address according to the type of its base... ZeevA possible solution might be to code a generic multibyte string walking function in the mb_string extension that, given a point to a multi-byte string, returns the wide character at the current position andadvances thepointer to the next wide-characterWhat about using a typedef or #define to define a "phpchar" type that is used in all such functions instead of "char"? Or would it be too inflexible to determine this at compile time? If only it was that simple; the problem is all the code that does str++ to advance through the string, so to make everything multi-byte safe, everything needs to change from str++ syntax to a multi-byte character advancing function/macro.