special unicode symbol in javascript (AJAX) -


i'm having trouble special symbols in javascript, hope cal me : )

first, allow user send text through form, , insert text in euc-jp data base.

the second part consists in display page text ajax, , show in simple alert when data arrives javascript code.

the problem when use symbol ⑴ (is u+2474, unicode). in case, when text inserted in data base, inserted "& # 9 3 3 2 ;" (i wrote blank avoid conversion in ⑴) in second part, use js file , php file called in ajax part. in php file, return text gotten data base using utf-8 encoding, that.

php file: echo mb_convert_encoding(row['text'], "utf-8","eucjp-win");

but when display text in javascript alert, displays "& # 9 3 3 2 ;"

i tried lot of stuff, , couldn't make display & # 9 3 3 2;, can me please?

thanks! : )

here difference:

alert('\u2474'); => ⑴ alert('\\u2474'); => \u2474 

you need escape leading backslash adding backslash :)


Comments

Popular posts from this blog

c# - how to write client side events functions for the combobox items -

exception - Python, pyPdf OCR error: pyPdf.utils.PdfReadError: EOF marker not found -