Links

Lists

Latest Updates

Ruby On Rails List
Python list
Advanced Java
The JavaScript List
Apache Users
Full Disclosure
Linux Security

Search the archives!


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Javascript] Encoding Unicode characters in HTML


  • From: judah-fc at t8design.com (Judah Frangipane)
  • Subject: [Javascript] Encoding Unicode characters in HTML
  • Date: Thu Aug 18 15:59:59 2005

Thanks guys. :)

Jens Brueckmann wrote:

>>>What I don't know is how to encode a unicode character. I am trying to
>>>encode a bullet character. The keystroke is ALT+0149 as displayed here
>>>?. There are many more unicode characters that I would like to let my
>>>users use. How do I encode the characters so that the browser renders
>>>them correctly?
>>>
>>>var myTextField.value = "Me, myself & I.";
>>>      
>>>
>
>Any character can be escaped in scripts using the following sequence:
>
>  \uHEX
>
>where HEX is the hexadecimal character reference. 
>
>Thus, your bullet becomes:
>
>  \u00B7
>
>or the above example:
>
>  var myTextField.value = "Me, myself \u0026 I.";
>
>Cheers,
>
>jens
>
>
>  
>
>------------------------------------------------------------------------
>
>_______________________________________________
>Javascript mailing list
>Javascript@xxxxxxxxxx
>https://lists.LaTech.edu/mailman/listinfo/javascript
>  
>