Discussions

EJB programming & troubleshooting: Displaying Chinese Characters using Javascript

  1. Displaying Chinese Characters using Javascript (1 messages)

    Hi, I need to translate my site into Chinese. (No frameworks are being used currently) Rest all has been done, but when coming to the alerts in Javascript, i'm stuck. e.g: neither , unicode nor the Hexa representation seems to work alert("未经授权的访问"); nor alert("\u672A\u7ECF\u6388\u6743\u7684\u8BBF\u95EE"); Can somebody guide me as to how to get the Chinese Characters displayed in the Alert Messages Thanks a lot.
  2. Both ways you list should work. This may help - post I wrote on character encoding Good luck.