TheNone
TheNone

Reputation: 5802

Native language problem in text() and html in jQuery

There is native language problem text() and html in jQuery :

$("li p span").html("");
$("li.checked p span").html('çşğü : ' + myVar);

The output is not similar to html() and look like unknown characters.

Im not using any serverside language and meta charset is charset=utf-8. How can I solve this problem. Thanks in advance

Upvotes: 0

Views: 123

Answers (1)

Pekka
Pekka

Reputation: 449703

Your file needs to be UTF-8 encoded as well. Check the encoding in whatever program you use to edit the file.

If the file has a UTF-8 "content-type" meta tag at the top, and its contents are UTF-8 encoded, and the server is not sending a header saying otherwise, it should work.

Upvotes: 1

Related Questions