Hi there,
I am trying to store data in a text file and output it to the browser
using PHP. All very easy - if I was using English! the problem is, I
want to use Japanese and I'm finding it a tad difficult to get PHP to
understand. I have two files, a text file containing data to display
and a php file with a script to display the data. I can get the
contents of a text file displayed in English, no problemo, but in
Japanese, it's another story...
All the correct settings are enabled in the php.ini file for Japanese
language support (mb_string, input_encoding, output_encoding settings
etc..etc..) even if I save the text file, to be read from, in
Shift_JIS encoding - I still can't get it to display normally!
here's the script I'm using to read the text file :
<?
$filename="test .txt";
$fp = fopen($filename ,'r');
while($line=fge ts($fp))
{
//output text file line
print $line."<br>";
}
fclose($fp);
?>
any suggestions?
thanks very much,
I would love it if PHP could understand Japanese...
David Thomas.
I am trying to store data in a text file and output it to the browser
using PHP. All very easy - if I was using English! the problem is, I
want to use Japanese and I'm finding it a tad difficult to get PHP to
understand. I have two files, a text file containing data to display
and a php file with a script to display the data. I can get the
contents of a text file displayed in English, no problemo, but in
Japanese, it's another story...
All the correct settings are enabled in the php.ini file for Japanese
language support (mb_string, input_encoding, output_encoding settings
etc..etc..) even if I save the text file, to be read from, in
Shift_JIS encoding - I still can't get it to display normally!
here's the script I'm using to read the text file :
<?
$filename="test .txt";
$fp = fopen($filename ,'r');
while($line=fge ts($fp))
{
//output text file line
print $line."<br>";
}
fclose($fp);
?>
any suggestions?
thanks very much,
I would love it if PHP could understand Japanese...
David Thomas.
Comment