Jump to content

I need help on japanese text


maiatot

Recommended Posts

I have problem on displaying japanese text from a data retrieved from Mysql. Displaying static text in HTML and with the use of declaring the japanese text in PHP it displays as japanese text. But once I retrieve a data from Mysql which is in japanese when it is displayed the only thing that appears are "??????".

configured mb_string to be utf8
also mysql and HTML utf-8

using Apache 2
Mysql 5
PHP 5
Link to comment
Share on other sites

[quote author=maiatot link=topic=110192.msg444960#msg444960 date=1159752139]
I have problem on displaying japanese text from a data retrieved from Mysql. Displaying static text in HTML and with the use of declaring the japanese text in PHP it displays as japanese text. But once I retrieve a data from Mysql which is in japanese when it is displayed the only thing that appears are "??????".[/quote]

Hi maiatot,

I know very little yet about php/mysql *but* have had some experience with character displays for html pages so I hope this helps :)  took me five months to figure out how to do this though I can't guarantee it will work for what you want (I discovered it whilst trying to get Excel to display hex codes rather than Russian characters, for the free dual-language worksheets being put together via http://www.happychild.org.uk/freeway/xxxxlanguage/translators01.htm ).

Try putting your mysql data into an Excel db/spreadsheet, then use Tools - Macro - Microsoft Script Editor, where the Japanese text will display as something like август (this is actually Russian but the only example I have to hand, to use).

Do a find-and-replace on [color=orange]&#[/color] , to [color=orange]&#[/color] .  Coding the ampersand will/should compel Excel to visibly display the hex codes (rather than the foreign-language characters) which can then be output into a text-and-tabs .txt file the content of which can then be telnetted into your mysql db.

Hope this works for you :)

Regards,

Penny. 
Link to comment
Share on other sites

[quote author=Penny_Rollo link=topic=110192.msg444978#msg444978 date=1159754795]
Do a find-and-replace on [color=orange]&#[/color] , to [color=orange]&#[/color] .  Coding the ampersand will/should compel Excel to visibly display the hex codes (rather than the foreign-language characters) which can then be output into a text-and-tabs .txt file the content of which can then be telnetted into your mysql db.[/quote]

Hi maiatot,

It occurs to me to add to this, that it might be useful to have set up your mysql database, that the .txt file is to be uploaded into, with "text" rather than "varchar" for the cells.  I've already used "text" with Polish character hex codes (which worked for the output pages, both php and static html).

I've also read that "text" allows more than the 255 chars of varchar, but can't confirm that until I finish the set-ups and try outputting some of the Russian-English worksheets (entries are very long as entirely composed of hex codes because of the Cyrillic alphabet).

I'll let you know what happens :)

Regards,

Penny.
Link to comment
Share on other sites

  • 5 weeks later...
[quote author=Penny_Rollo link=topic=110192.msg447711#msg447711 date=1160097176]
I've also read that "text" allows more than the 255 chars of varchar, but can't confirm that until I finish the set-ups and try outputting some of the Russian-English worksheets (entries are very long as entirely composed of hex codes because of the Cyrillic alphabet).

I'll let you know what happens :)[/quote]

Just to update here that "text" allowed the maximum number of characters actually required (up to 500 in some boxes) and the Russian seemingly output fine.

Regards,

Penny.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.