[prev in list] [next in list] [prev in thread] [next in thread] 

List:       php-i18n
Subject:    [PHP-I18N] Re: Problem with specific kanji
From:       61.201.199.148
Date:       2003-05-13 8:16:28
[Download RAW message or body]

Hi,

This is small php script that easier to execute in CLI mode. Save as
test.php and you can execute by "php test.php", this will show what problem
i'm facing now.

<?php

$in_sjis = "$Byu(B";
$in_eucjp = mb_convert_encoding($in_sjis, "euc-jp", "sjis");
$re_sjis = mb_convert_encoding($in_eucjp, "sjis", "euc-jp");

echo $in_sjis.chr(13).chr(10).$in_eucjp.chr(13).chr(10).$re_sjis;

?>

This kanji is used for naming convention, as you know japanese name kanji
sometime using non-standar kanji.

I've googling about this and found out that previously php had special kanji
problems too http://lists.php.net/article.php?group=php.dev&article=90786

As now I'm using php 4.3.1 it should be already using the patched version,
but in fact i'm still facing it, I'm intending to research about this
conversion  table further in php source code, can you point me out where is
this conversion part lies?

"Muhammad Rofiq" <rofiq@maltech.ne.jp> wrote in message
news:20030509131704.525.qmail@pb1.pair.com...
> Hi,
>
> I have trouble here :((
>
> I found one kanji that can not be translated to EUC-JP <-> SJIS-WIN
>
> $Byu(B or FA B1 (in hex)
>
> my method is simply using this line
>
> $result = mb_convert_encoding($value, "EUC-JP", "SJIS-WIN");
>
> and when I revert back to SJIS-WIN using
>
> $original = mb_convert_encoding($result, "EUC-JP", "SJIS-WIN");
>
> now the value of $original is "?", question mark.
>
> btw my search module giving me the right result when above kanji entered,
it
> just that question mark display on browser really ruin my day.
>
> I don't use internal euc-jp processing setting, i just using mb_string
> conversion functions. This method so far giving me good results.
>
> regards,
>


-- 
PHP Internationalization Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic