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
yohg...@ohgaki.net



On Thu, Nov 3, 2011 at 6:51 PM, Gustavo Lopes <glo...@nebm.ist.utl.pt> wrote:
> Em Thu, 03 Nov 2011 09:38:11 -0000, Yasuo Ohgaki <yohg...@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
>
>

--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to