Mailing List Archive
tlug.jp Mailing List tlug archive tlug Mailing List Archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]Re: [tlug] OT-Japanese in PHP
- Date: Fri, 27 May 2005 17:21:30 +0900
- From: Mark Sargent <powderkeg@example.com>
- Subject: Re: [tlug] OT-Japanese in PHP
- References: <42940FBF.1070207@example.com> <42942AF7.60101@example.com> <429437F5.7080300@example.com> <20050525.175305.243293414.dave@?om> <42943EC5.8010203@example.com> <42955AF3.8080508@example.com> <42955E23.2080000@example.com> <429563D2.8020104@example.com> <4295DC83.2020204@example.com>
- Organization: Home
- User-agent: Mozilla Thunderbird 0.9 (X11/20041127)
Hi All, after reading this post, ****** Firstly, your Apache charset settings have no effect on the Charset headers produced by PHP (I think). Secondly, I *STRONGLY* recommend that if you're not using an 8-bit character set, you use UTF-8 for everything. UTF-8 is the way to go. If you don't go there, you will be sorry. Unfortunately PHP has poor support for encodings, as it doesn't really know what a "string" is. As far as PHP is concerned, a string is an array of bytes. This means that functions like strlen() will get the answer wrong, and that string-manipulation functions will muck up UTF8 strings. The solution is to use only the mbstring versions of these functions - and if you need to use regular expressions etc, use preg with the utf-8 flag. Bear in mind also, that you'll want to write your PHP files in utf8 too - make sure the mbstring internal encoding is set to utf8. PHP really sucks for multibyte character set applications. It was designed by some Europeans who didn't understand what character encodings were (and couldn't see past ISO-8859-* anyway) ****** from a php forum, I changed my settings in php.ini to render UTF-8 including changing the database field that contained Japanese to UTF-8 and it displays fine in phpmyadmin. I then changed charset to UTF-8 in the php page, but, it still won't display J from the database. Anyone got a solution, apart from giving up, which I detest..? Cheers. Mark Sargent.
- Follow-Ups:
- Re: [tlug] OT-Japanese in PHP
- From: Evan Monroig
- Re: [tlug] OT-Japanese in PHP
- From: Stephen J. Turnbull
- References:
- Re: [tlug] OT-Japanese in PHP
- From: Mark Sargent
- Re: [tlug] OT-Japanese in PHP
- From: Erin D. Hughes via info@example.com
- Re: [tlug] OT-Japanese in PHP
- From: Mark Sargent
- Re: [tlug] OT-Japanese in PHP
- From: David E
- Re: [tlug] OT-Japanese in PHP
- From: Erin D. Hughes via info@example.com
- Re: [tlug] OT-Japanese in PHP
- From: Mark Sargent
- Re: [tlug] OT-Japanese in PHP
- From: Erin D. Hughes via info@example.com
- Re: [tlug] OT-Japanese in PHP
- From: Mark Sargent
- Re: [tlug] OT-Japanese in PHP
- From: Mark Sargent
Home | Main Index | Thread Index
- Prev by Date: Re: [tlug] [OT]Job Info from Rena in Tokyo
- Next by Date: Re: [tlug] OT-Japanese in PHP
- Previous by thread: Re: [tlug] OT-Japanese in PHP
- Next by thread: Re: [tlug] OT-Japanese in PHP
- Index(es):
Home Page Mailing List Linux and Japan TLUG Members Links