I will get the url and post it as all the lit. I've seen in English says exactly
what you have said.

As far as I know MySQL deals with Japanese using sjis & ujis character sets with
ujis being equivalent to euc-jp. [If anyone knows any different please feel free to
correct this!] Having read, which you also confirm that the internal encoding of php
should be the same as whatever the database is I have tried setting both the server
encoding (via webDav - i've never encountered this one before either) to euc-jp and
php's internal encoding to euc-jp with pages encoded as shift_jis and
mbstring.http_output as shift_jis..... which gives me mojibake with all the japanese
text on the pages and coming from the db.

I think there must be something here that I am missing or there is something with
this webDav ...?!

Cheers,
Claire

David Emery wrote:

> 2004/04/07 (水) 09:19 に Claire Hector さんは書きました:
> > I am aware that SJIS shouldn't be used for internal coding, however the config
> > of the server is out of my control and the person who has set it up determined
> > it was the best setup. It's his rice field ;-) .... i pointed out the very
> > clear warnings from the php site and he showed me a japanese language site
> > that basically justified this setup,
>
> If that's the case then surely he must have the work-around to your SJIS
> mojibake problems as well, since they're more or less guaranteed to
> happen with that set-up ;-) Incidentally I'd be interested in knowing
> the URL he pointed to - sounds a bit fishy to me.
>
> >  so when he wouldn't budge I went and
> > changed the config settings in both php and mysql myself to see if this would
> > fix the problem thus I had:
> >
> > Each page with shift_JIS encoding.
> >
> > mbstring.language=Japanese
> > mbstring.internal_encoding=EUC-JP
> > mbsting.http_output=SJIS
> >
> > MySQL table charater set ujis
>
> With internal_encoding=EUC-JP your script is expecting all internal data
> (including what comes from the DB) to be in EUC, so on output PHP is
> probably trying to do a conversion from EUC to SJIS on text that is
> actually in ujis (whatever that is?). So you get complete mojibake. I
> think you'll need the data coming from your DB in the same encoding as
> PHP's internal encoding.
>
> >
> > and Apache using an additional module for Japanese from webDAV called
> > mod_encoding
> > with ServerEncoding set to utf-8 & DefaultClientEncoding as JA-AUTO-SJIS-MS
>
> Dunno about webDav, but I'd guess that you'd want the ServerEncoding to
> be the same as PHP's internal encoding and the DB data encoding, no?
>
> Basically what I've always done is have everything going to and from the
> client in SJIS, and everything on the server in EUC. It's simple and
> I've never had any problems with encoding. As far as I know this is more
> or less the standard way to deal with Japanese in PHP.
>
> > ----------------------------------------------
> --
> -dave

-- 
PHP Internationalization Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to