Mailing List Archive


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

Re: [tlug] OT-Japanese in PHP



David E wrote:
> From: Mark Sargent <powderkeg@example.com> on Date: Wed, 25 May 2005 17:31:49 +0900
> 
> 
>>Erin D. Hughes via info@example.com wrote:
>>
>>
>>>Mark Sargent wrote:
>>>
>>>
>>>>Hi All,
>>>>output_handler = mb_output_handler
>>>>mbstring.language = Japanese
>>>>mbstring.internal_encoding = UTF-8
>>>>mbstring.http_input = auto
>>>>mbstring.http_output = SJIS
>>>>mbstring.encoding_translation = On
>>>>mbstring.detect_order = auto
>>>>mbstring.substitute_character = none
>>>>mbstring.internal_encoding = EUC-JP
>>>>
>>>>Now, I think I still haven't got the page that requires J, displayed 
>>>>right, yet. Full code is below. Can anyone see any mistakes..? Cheers.
> 
> 
> You haven't given any details on what seems wrong with the output. 
> 
> This is kind of obvious, but have you made sure the text in the
> database is in the sme encoding as you have mbstring.internal_encoding
> set to? (You have it set twice, to different values in your config
> above - I assume the last one set gets used, but safer to just make up
> your mind, don't you think?)
> 
> Dave
> 
Dave I agree that is another valid point.

I think he should first rule out the other problems though

A. Make a test page with some Japanese text in HTML and test. IS that 
OK? If yes go to B

B. Make a test page in PHP with the same text and test. IS that OK? If 
yes go to C.

C. Make a test PHP page that pulls data from the DB. And in 3 separate 
lines with each line (data in the db encoded differently IE UTF-8, 
Shift-jis and EUC) and see what comes out right.

Also it is important to check the co-location in your DB if your using 
MYSQL 4.XXXXXXXXXX there are very specific settings that I have had a 
lot of trouble with my self in the past..... But that is another issue I 
am sure.

E./



Home | Main Index | Thread Index

Home Page Mailing List Linux and Japan TLUG Members Links