What's so great about latin1_swedish_ci

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

pilau
Forum Regular
Posts: 594
Joined: Sat Jul 09, 2005 10:22 am
Location: Israel

Post by pilau »

That's quite bad, because I'm starting to work on a Hebrew forum right now, and if users will like to have nicknames in Hebrew, I bet it won't work, right?
User avatar
onion2k
Jedi Mod
Posts: 5263
Joined: Tue Dec 21, 2004 5:03 pm
Location: usrlab.com

Post by onion2k »

A database column set as latin1_swedish_ci won't be able to store Hebrew names, no. You have 3 options available to you:

1. Change the charset and collation of the column to a Hebrew setting.

2. Change the charset and collation of the column to a UTF-8 international setting.

3. Escape the data into something that can be stored in a latin charset, and unescape it again when you get it back out. Something like base64 encoding for example.
Post Reply