Jump to content


Photo

I need help on japanese text


  • Please log in to reply
3 replies to this topic

#1 maiatot

maiatot
  • Members
  • Pip
  • Newbie
  • 1 posts

Posted 02 October 2006 - 01:22 AM

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

#2 Penny_Rollo

Penny_Rollo
  • Members
  • PipPip
  • Member
  • 20 posts
  • LocationEngland

Posted 02 October 2006 - 02:06 AM

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 "??????".


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.happychil...anslators01.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 &# , to &# .  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. 
Penny Rollo

usually at http://www.happychild.org.uk

#3 Penny_Rollo

Penny_Rollo
  • Members
  • PipPip
  • Member
  • 20 posts
  • LocationEngland

Posted 06 October 2006 - 01:12 AM

Do a find-and-replace on &# , to &# .  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.


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.
Penny Rollo

usually at http://www.happychild.org.uk

#4 Penny_Rollo

Penny_Rollo
  • Members
  • PipPip
  • Member
  • 20 posts
  • LocationEngland

Posted 04 November 2006 - 06:35 PM

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 :)


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.


Penny Rollo

usually at http://www.happychild.org.uk




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users