php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #22040 PHP hangs when reading certan japaneese or chineese chars
Submitted: 2003-02-04 03:56 UTC Modified: 2003-03-06 07:14 UTC
Votes:4
Avg. Score:4.8 ± 0.4
Reproduced:0 of 0 (0.0%)
From: dan at scannet dot dk Assigned:
Status: Closed Package: Gettext related
PHP Version: 4.3.0 OS: Win2k
Private report: No CVE-ID: None
 [2003-02-04 03:56 UTC] dan at scannet dot dk
$lang = "ja_JP";
putenv ("LANG=".eregi_replace('.*_','',$lang)); 
putenv("LC_ALL=$lang");
setlocale(LC_ALL, "");

bindtextdomain("horde", "C:\Program Files\Apache Group\Apache\web\horde\locale");

textdomain("horde");
echo gettext('Addressbook')    ."\n"; //Returns some japaneese chars..
echo gettext('Delete')         ."\n"; //Returns some japaneese chars..

echo gettext('Birthday') ."\n"; //PHP hangs.. 
echo gettext('Mail')     ."\n"; //PHP hangs.. 
echo gettext('Daily')    ."\n"; //PHP hangs.. 

/*
In HEX:
Birthday: 92 61 30 b6 93 fa
Mail:	  93 64 8e 71 83 81 81 5b 83 8b
Daily:    96 88 93 fa

The only char in common for all 3 is $93
thats #147 in dec..
*/

$test = chr(147);
echo $test;
echo _($test);
// I copy $93 to the $test variable.. Then print $test then print gettext($test)..
// All theese work perfectly, so it seems its not a general problem in php.. 

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2003-03-04 03:51 UTC] moriyoshi@php.net
Which version of apache are you using?

 [2003-03-04 04:12 UTC] dan at scannet dot dk
Hmm... It looks like 1.3.27 according to one of the docs.
this problem also occurs when running PHP.exe from commandline..
 [2003-03-04 04:24 UTC] moriyoshi@php.net
Please try using this CVS snapshot:

  http://snaps.php.net/php4-STABLE-latest.tar.gz
 
For Windows:
 
  http://snaps.php.net/win32/php4-win32-STABLE-latest.zip

I cannot reproduce this with the latest snapshot.
All those strings have been displayed correctly on my screen.
 [2003-03-06 07:12 UTC] dan at scannet dot dk
Thank you.. That solved the problem...
 [2003-03-06 07:14 UTC] dan at scannet dot dk
Closing the bug :)
 
PHP Copyright © 2001-2020 The PHP Group
All rights reserved.
Last updated: Sat Jan 18 14:01:23 2020 UTC