CodeIgniter Forums
Inserted strings get truncated when they contain german "Umlaute" like ä, ü, ö .... [URGENT] - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20)
+--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23)
+--- Thread: Inserted strings get truncated when they contain german "Umlaute" like ä, ü, ö .... [URGENT] (/showthread.php?tid=24846)



Inserted strings get truncated when they contain german "Umlaute" like ä, ü, ö .... [URGENT] - El Forum - 11-22-2009

[eluser]mradlmaier[/eluser]
Hello all,

I discovered following strange bug in my app:
I have a textfield. I enter a string which contains a german Umlaut (ä, ü, ö, etc.). When inserted in the database, the string is truncated before the germen Umlaut.

I am using MySQL and the collation of the column is utf8_general_ci. Does anybody know how to fix that?

Thanks for any hints,
Michael


Inserted strings get truncated when they contain german "Umlaute" like ä, ü, ö .... [URGENT] - El Forum - 11-22-2009

[eluser]pistolPete[/eluser]
Have a look at http://philsturgeon.co.uk/news/2009/08/UTF-8-support-for-CodeIgniter and follow all those instructions.


Inserted strings get truncated when they contain german "Umlaute" like ä, ü, ö .... [URGENT] - El Forum - 11-22-2009

[eluser]mradlmaier[/eluser]
pistolPete,

I assume, that i can convert the database with phpAdmin accordingly?

You are sure, this will work and fix it?
While changing a few lines of code in CI can be reversed easily, messing around with the database is another issue...

Michael


Inserted strings get truncated when they contain german "Umlaute" like ä, ü, ö .... [URGENT] - El Forum - 11-22-2009

[eluser]pistolPete[/eluser]
I can't guarantee that it works, so I would setup a new database and tables and copy any existing data there.


Inserted strings get truncated when they contain german "Umlaute" like ä, ü, ö .... [URGENT] - El Forum - 11-22-2009

[eluser]mradlmaier[/eluser]
Thanks, pistolPete,
It worked exactly as described. Like a breeze...Took a few minutes to fix the problem.