maiatot Posted October 2, 2006 Share Posted October 2, 2006 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 utf8also mysql and HTML utf-8using Apache 2Mysql 5PHP 5 Quote Link to comment Share on other sites More sharing options...
Penny_Rollo Posted October 2, 2006 Share Posted October 2, 2006 [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. Quote Link to comment Share on other sites More sharing options...
Penny_Rollo Posted October 6, 2006 Share Posted October 6, 2006 [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. Quote Link to comment Share on other sites More sharing options...
Penny_Rollo Posted November 4, 2006 Share Posted November 4, 2006 [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. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.