Code Comments
Programming Forum and web based access to our favorite programming groups.Hi all, I have a small site, all in English right now, and the client wants visitors to be able to select between English, Polish or Russian. I have the translation text in MS Word docs. My thought was to store the text in MySQL tables and then pull it out for display based on a session var. Seems simple enough, I'm just having a little trouble as to how to format the text properly. Can anyone help - how do I get the text, with all the crazy characters, from Word into a text field in MySQL, and then out to display on the page? Simple URLencoding didn't work... -- Dave - Head Developer http://www.blurredistinction.com Adobe Community Expert http://www.adobe.com/communities/experts/
Post Follow-up to this messageOn Mon, 20 Aug 2007 23:27:34 +0200, Dave Mennenoh = <dave@blurredistinction.com> wrote: > Hi all, I have a small site, all in English right now, and the client = = > wants > visitors to be able to select between English, Polish or Russian. I ha= ve = > the > translation text in MS Word docs. My thought was to store the text in = = > MySQL > tables and then pull it out for display based on a session var. Seems = = > simple > enough, I'm just having a little trouble as to how to format the text > properly. > Can anyone help - how do I get the text, with all the crazy characters= , = > from > Word into a text field in MySQL, and then out to display on the page? = = > Simple > URLencoding didn't work... Urlencoding is only for urls, not for content. - Use the iconv_* function to all in UTF-8 to let PHP behave nicely. - Set the field (or table, or database) in the database to utf-8, run "S= ET = names=3D'UTF8'" once on the database connection prior to evry other quer= y. - Output a header (either use the default_charset setting in php.ini or = = output your own header()) informing the UA everything is in UTF8. -- = Rik Wasmus
Post Follow-up to this message
Show a Printable Version
Email This Page to Someone!
Receive updates to this thread
Powered by vBulletin
Copyright 2000-2006 Jelsoft Enterprises Limited.