homepage Welcome to WebmasterWorld Guest from 54.167.238.60
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Pubcon Platinum Sponsor 2014
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.
dmmh




msg:3623576
 1:48 pm on Apr 10, 2008 (gmt 0)

Hi,

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

 

httpwebwitch




msg:3623815
 6:18 pm on Apr 10, 2008 (gmt 0)

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

dmmh




msg:3624305
 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