European accented characters are corrupted if the string is fetched from a
server-generated javascript and rendered using document.write(). But if the
string is defined locally on the page, it comes out OK. Example:

<HTML>
<HEAD>

<SCRIPT LANGUAGE="JavaScript">
<!--
// Locally defined string
var phrase1 = "El mercado est� abierto cada mi�rcoles.";
// -->
</SCRIPT>

<!-- String fetched from server -->
<SCRIPT LANGUAGE="JavaScript"
SRC="http://mydomain.com.au/esdata.cfm";></SCRIPT>
</HEAD>

<BODY>
<SCRIPT LANGUAGE="JavaScript">
<!--
document.write(phrase1);
document.write("<BR>");
document.write(phrase2);
// -->
</SCRIPT>
</BODY>
</HTML>

The server-side script esdata.cfm contains the following:
<CFOUTPUT>
var phrase2 = "El mercado est� abierto cada mi�rcoles.";
</CFOUTPUT>

The above page renders as:

El mercado est� abierto cada mi�rcoles.
El mercado está abierto cada miércoles. (Yuk!)

I can write a javascript function to convert back client side, but is there
a simpler solution I'm missing? I'm sure within the cosmopolitan community
on this list there must be some globalization gurus.

Regards: Ayudh

+----------------------------------------------------------------+
| SOAP is the glue! Hook up your server directly to your bank.   |
| Connect to VeriPay xServ, the Australian Payments Web Service. |
| Reliable, Secure, FAST: http://www.xilo.com/xserv              |
+----------------------------------------------------------------+


---
You are currently subscribed to cfaussie as: [EMAIL PROTECTED]
To unsubscribe send a blank email to [EMAIL PROTECTED]

MXDU2004 + Macromedia DevCon AsiaPac + Sydney, Australia
http://www.mxdu.com/ + 24-25 February, 2004

Reply via email to