homepage Welcome to WebmasterWorld Guest from
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member

Home / Forums Index / Code, Content, and Presentation / JavaScript and AJAX
Forum Library, Charter, Moderator: open

JavaScript and AJAX Forum

properly display certain characters in a javascript select menu.

5+ Year Member

Msg#: 3623574 posted 1:48 pm on Apr 10, 2008 (gmt 0)


I don't know how to tackle this, I need to display the and ū characters like I write them here in a dynamically created javascript select box. Is there a certain function I can call on this to display these characters properly?

Seems javascript doesn't play nice with Unicode characters...

I simply write strings like obj.options[obj.options.length] = new Option('ū'),'133'); to a container, but they are encoded in the DB like &#363, so I use PHP's html_entity_decode() on the database result first, next I need to prepare for javascript, but this fails....

edit: seems WebmasterWorld doesn't like the Unicode Character 'LATIN SMALL LETTER U WITH MACRON' (U+016B) either....



WebmasterWorld Administrator httpwebwitch us a WebmasterWorld Top Contributor of All Time 10+ Year Member

Msg#: 3623574 posted 6:18 pm on Apr 10, 2008 (gmt 0)

<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">


5+ Year Member

Msg#: 3623574 posted 7:21 am on Apr 11, 2008 (gmt 0)

thanks, doesnt work though

I really think it is going wrong on the javascript side though, I dont have any problems displaying those characters with just PHP :)

Global Options:
 top home search open messages active posts  

Home / Forums Index / Code, Content, and Presentation / JavaScript and AJAX
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