problems with asian characters in javascripts

G

gECKo

hi,

not sure if this is a dw issue or a javascript issue or an imaginary issue!

i'm coding nav bars into some doc write statements to use on a template for
multi-language website.

the chinese (simplified) version of the .js file contains -as an example - a
link to "go to top of page", like this:

<a href="#" class="link1"><SPAN LANG="zh-cn"><FONT FACE="SimSun,
宋体">返回页首</FONT></SPAN></a>

the chinese (original) version of the .js file, I left out the font face,
because the font renders fine with the LANG attrib set in the SPAN, ... but
dreamweaver always pulls this strange number on me. Instead of the
"" codes that I put in when I wrote the code, the next day I open
the .js file up and it ends up with ASCII gibberish, like so....

<a href="#" class="link1"><span lang="zh-tw">ÔÞV~-T</span></a>

simply because I left out the "font face" code? i doubt it.
i know this is a very cranky, very specific, very rare problem ...

but if there are any chinese coders out there (or just plain ol' DW
hackers!!)... >> please enlighten me!!

thanks for all any any comments.

Al Brighten
 
S

Steve Pugh

gECKo said:
i'm coding nav bars into some doc write statements to use on a template for
multi-language website.

Out of curiosity, which language appears if the user has JS disabled?
the chinese (simplified) version of the .js file contains -as an example - a
link to "go to top of page", like this:

<a href="#" class="link1"><SPAN LANG="zh-cn"><FONT FACE="SimSun,
宋体">返回页首</FONT></SPAN></a>

the chinese (original) version of the .js file, I left out the font face,
because the font renders fine with the LANG attrib set in the SPAN,

And without the lang attribute? I would bet it appears just the same.
... but
dreamweaver always pulls this strange number on me. Instead of the
"" codes that I put in when I wrote the code, the next day I open
the .js file up and it ends up with ASCII gibberish, like so....

<a href="#" class="link1"><span lang="zh-tw">Ô?ÞV
~-T</span></a>

Does it really change lang="zh-cn" to lang="zh-tw"? That would be a
very political statement for a piece of software to make. ;-)
simply because I left out the "font face" code? i doubt it.
i know this is a very cranky, very specific, very rare problem ...

Which version of DW? I had problems with DW MX rewriting entities,
etc., that it shouldn't have, but DW MX 2004 seems to have fixed most
of them.

Steve
 
G

gECKo

It's DW/MX.
haven't done the 2004 thing.
and your right :)
the "cn" and "tw" were not changed, just my own typos.
but the ascii junk has still happened on a number of occasions.

i fiddled with taking out both the lang spans and the font-face
declarations, and this seems to have stabilized it.

just another one of the "many" unsolved riddles of "life with computers".

thanks for your input...

(yeah, in retrospect, guess the LANG span is a bit redundant. it probably
will or won't display depending on the lang support enabled in the browser.
font face may be a bit more useful in opting for
other-than-browser-defaults, which is "who-knows-what" in china, taiwan,
etc....)

Al
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,770
Messages
2,569,584
Members
45,077
Latest member
SangMoor21

Latest Threads

Top