We help IT Professionals succeed at work.
Get Started

javascript pass Chinese characters fails

1,002 Views
Last Modified: 2012-08-14
I generated a javascript code which is called from the brwoser.

When I check inside the IDE, everything looks good

var LeftBarcoalHtml = new Ext.ux.Html({
      width:60,
      value: '¿ ¿',
      name: 'LeftBar_coal',
      id: 'home_LeftBar_coal_id'
});

but when it arrived FF, the display becomes '? ?". I used Firebug to take a look at the javascript, it says

var LeftBarcoalHtml = new Ext.ux.Html({
width:60,
value: '? ?',
name: 'LeftBar_coal',
id: 'home_LeftBar_coal_id'
});

I tried playing with view -> character encoding -> Chinese Simplified (GB2312), but made no difference.

Is there something you need to declare to make the Chinese char show up in the browser properly?

note: happens here too. when I paste the Chinese char into the question, it looked good. Once submitted it becomes inverse ? like you see here.
Comment
Watch Question
Multitechnician
CERTIFIED EXPERT
Distinguished Expert 2020
Commented:
This problem has been solved!
Unlock 1 Answer and 8 Comments.
See Answer
Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

When asked, what has been your best career decision?

Deciding to stick with EE.

Mohamed Asif
Technical Department Head

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant
Ask ANY Question

Connect with Certified Experts to gain insight and support on specific technology challenges including:

  • Troubleshooting
  • Research
  • Professional Opinions
Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE