Re: Zend Multibyte support
| From: | Yasuo Ohgaki | Date: | Thu, 03 Nov 2011 10:07:19 +0000 |
| Subject: | Re: Zend Multibyte support | ||
| References: | 1 2 3 4 5 6 7 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-56024@lists.php.net to get a copy of this message | ||
Hi Gutavo,
Now I see what is going on. I thought string is treated as just a
bunch of data once
is was compiled and passed through.
$ ./sapi/cli/php -d zend.multibyte=1 -d zend.script_encoding=SJIS -d
mbstring.internal_encoding=utf-8 sjis.php 表
Thanks for your time.
May be I should document this, since there may be a confusion.
--
Yasuo Ohgaki
yohgaki@ohgaki.net
On Thu, Nov 3, 2011 at 6:51 PM, Gustavo Lopes <glopes@nebm.ist.utl.pt> wrote:
> Em Thu, 03 Nov 2011 09:38:11 -0000, Yasuo Ohgaki <yohgaki@ohgaki.net>
> escreveu:
>
>> Oops, I thought "?" was due to terminal encoding, but I double checked
>> with
>> redirecting to a file.
>>
>> $ ./sapi/cli/php -d zend.multibyte=1 -d zend.script_encoding=SJIS sjis.php
>> > tt
>>
>> It became "?" instead of "表"..
>> It seems something wrong.
>>
>> Thanks for you time.
>
> You also have to say what it's converted *to* (I think, but I'm not sure,
> the default is ISO-8859-1). This works:
>
> $echo 表 | uconv -f utf-8 -t sjis > sjis.php
> $./php -d zend.multibyte=1 -d zend.script_encoding=SJIS -d
> mbstring.internal_encoding=utf-8 sjis.php
> 表
>
> --
> Gustavo Lopes
>
> --
> PHP Internals - PHP Runtime Development Mailing List
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>