reading japanese text from excel file

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
cashan
Forum Newbie
Posts: 1
Joined: Thu May 16, 2002 1:35 am
Location: Dhaka
Contact:

reading japanese text from excel file

Post by cashan »

Hi,
I am reading an excel file with php which contains some japanese text.
I am using the following code:

<?php
$db = odbc_connect("testXL","", "");
$query2 = "SELECT * FROM [test$]";
$result = odbc_exec($db, $query2);
odbc_result_all($result);
?>

My problem is the japanese text turns out to be ???... How to solve this
problem. I need to save these data into MySQL db.
Please reply ASAP

Thanks
User avatar
volka
DevNet Evangelist
Posts: 8391
Joined: Tue May 07, 2002 9:48 am
Location: Berlin, ger

Post by volka »

sounds like you have an unicode-problem.
Since I'm still a php beginner I haven't been confronted with this problem yet. But looking into the php-reference I only found utf8_en/decode and this link. It also may be that the datatransfer to/from the database fails on unicode. If, encoding the string as base64 (or similar) may help.
Post Reply