Bug Tracker

Opened 12 years ago

Closed 12 years ago

Last modified 8 years ago

#1662 closed bug (worksforme)

can't use val("xxx") set unicode character to a text input

Reported by: guapo Owned by:
Priority: major Milestone: 1.2.2
Component: core Version: 1.2.1
Keywords: Cc:
Blocked by: Blocking:

Description

i use

$("#test").val("hello");

,success. and if i use

$("#test").val("中华人民共和国");

fail.

Attachments (2)

jquery_test.html (1.0 KB) - added by davidserduke 12 years ago.
test case
script.js (83 bytes) - added by davidserduke 12 years ago.
required for test case

Download all attachments as: .zip

Change History (3)

Changed 12 years ago by davidserduke

Attachment: jquery_test.html added

test case

Changed 12 years ago by davidserduke

Attachment: script.js added

required for test case

comment:1 Changed 12 years ago by davidserduke

Milestone: 1.2.11.2.2
Resolution: worksforme
Status: newclosed

I can't claim to know much about unicode but this doesn't appear to be a jQuery problem. I was able to produce a test case (attached) where jQuery did just fine for me although it wasn't easy. I finally was able to produce the code written in Microsoft Word and did a Save As to a text file with UTF-8 format. I then renamed it as a .js file and it worked. Until I found the right document format it wasn't working.

Hopefully this helps.

Note: See TracTickets for help on using tickets.