Problem adding polish letters into the database

#1
[eluser]jacobson[/eluser]
Hello I have a problem with codeigniter and mysql database. I have my database set to utf8_general_ci, in the coonfig/database i have the same
$db['default']['char_set'] = 'utf8';
$db['default']['dbcollat'] = 'utf8_general_ci';

and still when I try to process the polish letter i get an error
http://screenshotuploader.com/s/CahgEhnYcz

where could be the problem ?

#2
[eluser]eoinmcg[/eluser]
couple of things to check:
1. have you set Content-type to utf8 in the head of your html? (<meta http-equiv="Content-type" content="text/html; charset=utf-8" />
)?
2. is your database / database tables using utf8 / utf8_general_ci’ ?

here's a handy guide to what you should be doing:
http://philsturgeon.co.uk/blog/2009/08/U...odeIgniter

#3
[eluser]Unknown[/eluser]
Show us some code (html headers, controller and model).

You can write a PM to me, I'll try to help you in polishWink

#4
[eluser]Ken Verhaegen[/eluser]
Validate the input with htmlspecialchars (special chars become &charname; in the database) or something before you add the text into the database.
You'll now have decent encoding to send to your database Wink
Grts.


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2019 MyBB Group.