I need to select data from an nchar field in a sqlserver database, persist
it to XML, then transform it using XSL, (all in COM component called from
ASP - returning HTML ), outputting HTML (Response.Write the string
returned from COM+).
The data may contain european characters such as
? é
and also chinese characters such as
???? (it looks like SQLserver stores these as
两个月前)
There seem to be a lot of stages along the way where the encoding can be set
and/or will default to a certain encoding (COM defaults to UTF-16?)
What do I need to set to be able to see (and input) both Eurpoean and
Chinese (Simplified) characters?
So far I'm using;
XML FROM
RECORDSET-------------------------------------------------------------
In the recordset the Chinese char is 个 but when persisted to XML the
ampersand at the front is shown as &
<data>&#20010;</data>
So I'm replacing "&#" with "&# " to output 个 in the XML
XML
HEADER----------------------------------------------------------------------
---------
I grab the documentElement.xml of the XML from several recordsets and build
up a 'master' XML string. The header that I use on this string is;
<?xml version='1.0' encoding='ISO-8859-1'?> (should I change this to <?xml
version='1.0' encoding='utf-8'?>)
XSL
TRANSFORMATION--------------------------------------------------------------
I then transform the XML using XSL. - no encoding specified that I can
think of..
ASP-------------------------------------------------------------------------
---------------------
The resulting HTML string is returned to the ASp from the COM component.
At the moment I have no codepage set in the ASP..what effect would setting
this have?
HTML------------------------------------------------------------------------
----------------------
The Meta tag in the HTML is set to ;
<META http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>