Page 1 of 1

preserving character encoding before going to mysql db

Posted: Tue Jan 19, 2010 10:41 pm
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?

Re: preserving character encoding before going to mysql db

Posted: Wed Jan 20, 2010 3:45 am
by josh
You could make sure the charset of the connection and of the table are set to UTF-8 or something

Re: preserving character encoding before going to mysql db

Posted: Wed Jan 20, 2010 7:12 am
by mlecho
the table portion i understand, but what do you mean by "charset of the connection"

Re: preserving character encoding before going to mysql db

Posted: Wed Jan 20, 2010 7:20 am
by josh