Welcome Guest, Not a member yet? Register   Sign In
Unicode issues with Database library (using Mysql driver)
#1

[eluser]shawn[/eluser]
(I searched around for similar problems as mine in both the forum and bug tracker but I didn't find anything related...)

I started the prcoess of upgrading one of my CI 1.5.4 apps to 1.6.1 ... changing nothing at all other than the CI framework is showing some serious wonkyness with UTF-8 data coming from my MySQL database.

The data in question is properly encoded (100% sure of this) UTF-8 Arabic text stored in a MySQL 5 database with the character set and collation set to their proper utf-8 modes.

In 1.5.4 I had no problems selecting and displaying this content within a wide range of CI library functions... but in 1.6.1 the upper range Unicode characters (all of the Arabic content) is coming out encoded incorrectly... no munging of this content with the multibyte functions (mb_*) seems to help... and when I finally went through and printed out the raw character data with ord() I can see now that there is a serious problem... it is almost like it is being doubled encoded or something.

Use of Active Record or straight hand-crafted SQL queries makes no difference... nor did swapping between the mysql and mysqli drivers.

The server I'm using is on PHP 5.1.4 (though I'm sure there are some security patches backported to this as the server is using a PHP version provided through the FreeBSD ports tree...).

Anyone else encounter this?




Theme © iAndrew 2016 - Forum software by © MyBB