Mailing List Archive


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [tlug] OT-Japanese in PHP



Hi Mark,

On 2005/05/20@example.com:51, <Mark Sargent> wrote:
  Mark> 
  Mark> I apologize up front if I've broken a golden rule, posting this here. 
  Mark> I'm learning PHP/MYSQL and am trying to get Japanese pulled from the 
  Mark> database to display correctly. I've set this at the top of my pages,
  Mark> <html lang="Shift_JIS">
  Mark> and this for the font
  Mark> <font type=\"Shift_JIS\">$product_data_output</font>

I think you are mixing up a couple of things, to pull out Japanese data 
from MYSQL you will provably need to make MYSQL aware of the
character set you intent to use, support for character set handling
was added to MYSQL in version 4.1.

As for the PHP code, it might be enough to specify a default media type 
charset parameter to your web server, example for  Apache you could
use the AddDefaultCharset Directive.

Then you'll have to make shure that PHP is encoding the outputs to
the proper character set.

Hope you have enough info here to spend some time researching by
yourself now :)


//mauro//


Home | Main Index | Thread Index

Home Page Mailing List Linux and Japan TLUG Members Links