homepage Welcome to WebmasterWorld Guest from
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member
Visit PubCon.com
Home / Forums Index / Code, Content, and Presentation / HTML
Forum Library, Charter, Moderators: incrediBILL

HTML Forum

charset issue

 8:22 am on Jan 28, 2011 (gmt 0)


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.




 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.
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.



 12:41 pm on Jan 28, 2011 (gmt 0)

how do I check those in mysql?


 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.



 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>

Global Options:
 top home search open messages active posts  

Home / Forums Index / Code, Content, and Presentation / HTML
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved