| charset issue
|
hozyali

msg:4259325 | 8:22 am on Jan 28, 2011 (gmt 0) | Hi, I have a site using spanish language. The site was basically built using a separate language pack and smarty template engine. The site works fine for English and Spanish too. The charset is set to UTF-8. It accepts the ascents like ñ but the only problem I am facing is when this ñ comes from the database in a SELECT drop down menu, it shows a ? mark in that. When I try to change the charset to iso-8859-1, it fixes this issue in the drop down, but messes up everywhere the same ñ coming from the language pack variables. Please help. Thanks
|
kaled

msg:4259407 | 12:26 pm on Jan 28, 2011 (gmt 0) | Firstly, if you haven't done so already, you must check that the database is at fault by placing ñ statically into a <select>. Thereafter, if it is the database, either the data is stored incorrectly, or it is being extracted incorrectly - those are your only options. If the database stores data in unicode/utf-8 format then it is likely that data is being stored incorrectly. OR If the database stores data in 8bit/Ansi format, that data will need to be converted to unicode/utf-8 format if it is going to be used on a unicode/utf-8 page. In other words explicit conversion to unicode/utf-8 may be required either when storing data or when retrieving it. Kaled.
|
hozyali

msg:4259412 | 12:41 pm on Jan 28, 2011 (gmt 0) | how do I check those in mysql?
|
kaled

msg:4259530 | 4:36 pm on Jan 28, 2011 (gmt 0) | I don't work with databases so you'll have to figure out that part yourself unless someone else can help. You may find this useful, otherwise try searching for MySQL UTF8. [dev.mysql.com...] Kaled.
|
jalarie

msg:4260875 | 11:53 pm on Jan 31, 2011 (gmt 0) | I had a similar problem with a .js file that I was trying to display. I solved it with:
<script ... charset="ISO-8859-1"></script>
|
|
|