preserving character encoding before going to mysql db

Ye' old general discussion board. Basically, for everything that isn't covered elsewhere. Come here to shoot the breeze, shoot your mouth off, or whatever suits your fancy.
This forum is not for asking programming related questions.

Moderator: General Moderators

Post Reply
mlecho
Forum Commoner
Posts: 53
Joined: Wed Feb 02, 2005 9:59 am

preserving character encoding before going to mysql db

Post by mlecho »

hi.
i have some data that i capture and send to a MySQL db. It is not uncommon that much of this data will be of foreign characters with accents and other marks. My concern is two fold. Can i just pass this data straight over to the DB or must i wrap it with a method (encode, etities, etc) before adding to the DB. One thing to note...much of the data will be rendered on mobile devices and not in browsers. So currently, based on how i have things i am getting characters that are not converting correctly but rather giving me their unicode equiv (S?bastien insted of Sebastien with an accent) . Any ideas on how to resolve this?
josh
DevNet Master
Posts: 4872
Joined: Wed Feb 11, 2004 3:23 pm
Location: Palm beach, Florida

Re: preserving character encoding before going to mysql db

Post by josh »

You could make sure the charset of the connection and of the table are set to UTF-8 or something
mlecho
Forum Commoner
Posts: 53
Joined: Wed Feb 02, 2005 9:59 am

Re: preserving character encoding before going to mysql db

Post by mlecho »

the table portion i understand, but what do you mean by "charset of the connection"
josh
DevNet Master
Posts: 4872
Joined: Wed Feb 11, 2004 3:23 pm
Location: Palm beach, Florida

Re: preserving character encoding before going to mysql db

Post by josh »

Post Reply