Tag-Archive for » UTF-8 «

Monday, February 09th, 2009 | Author: AHSauge

I’ve previous been writing about why PHP and Unicode/UTF-8 is a bad combination. Even though UTF-8 in PHP should (for now) be avoided, it is sometimes a necessity to use it. As UTF-8 can be quite problematic for some people to use, I thought I this time should write about how to actually use it properly. In this first part I’ll deal with the basic handling of UTF-8 in PHP using the PHP extensions mbstring and/or iconv.

more…

Category: PHP  | Tags: , , , , , ,  | 6 Comments
Monday, October 27th, 2008 | Author: AHSauge

One thing that really annoy me these days is the unrestricted enthusiasm for PHP and Unicode, primarily in the form of UTF-8. These people seem to think that Unicode is some fantastic thing they just have to use even though a single byte charset like ISO-8859-1 is more than sufficient for their need. Don’t get me wrong, Unicode is good and everything, but not when you’re using PHP. Why? Because PHP by itself does not support Unicode. Now I know alot of people will object and say that there is mbstring. If you’re one of them, please read this carefully: mbstring is a Swiss cheese. Now I know alot of people is not using mbstring and basicly is using Unicode (most likely UTF-8) blissfully unaware of it’s dangers. So before I get into why mbstring is a horrible piece of coding, I’d like to explain why you shouldn’t use Unicode without some measures. more…

Category: PHP  | Tags: , , , ,  | One Comment