Click here to Skip to main content
16,006,013 members
Home / Discussions / XML / XSL
   

XML / XSL

 
GeneralThanks a mil!!! Worked like a magic Pin
Anonymous31-Jan-05 14:02
Anonymous31-Jan-05 14:02 
GeneralHelp with converting Dataset to ADO schema..please! Pin
Dankarmy30-Jan-05 8:26
Dankarmy30-Jan-05 8:26 
GeneralUnicode encoding problem Pin
teo_xp29-Jan-05 2:27
teo_xp29-Jan-05 2:27 
GeneralRe: Unicode encoding problem Pin
teo_xp29-Jan-05 2:29
teo_xp29-Jan-05 2:29 
GeneralRe: Unicode encoding problem Pin
teo_xp29-Jan-05 2:30
teo_xp29-Jan-05 2:30 
GeneralRe: Unicode encoding problem Pin
DavidNohejl29-Jan-05 2:56
DavidNohejl29-Jan-05 2:56 
GeneralRe: Unicode encoding problem Pin
teo_xp29-Jan-05 10:45
teo_xp29-Jan-05 10:45 
GeneralRe: Unicode encoding problem Pin
DavidNohejl29-Jan-05 12:53
DavidNohejl29-Jan-05 12:53 
hi again,

teo_xp wrote:
About the first : i have auto-select.
Out of curiosity, you tried to set it explicitly to UTF-16, did you? Smile | :) (I'll never ever belive IE)

I've googled a little and found this[^] so far (and your question in another forum).

Basicaly, there are tree points where encoding can go bad:
SQL DB-> recordset
recordset->XSLT transformed file
XSLT transformed file->browser
<code>
' rs is an ADO recordset filled with data from a sql Select statement <- UTF-16 (nvarchar from SQL)
styleFile = Server.MapPath(xslfile)
set stylexml =Server.CreateObject("MSXML2.FreeThreadedDOMDocument")
stylexml.async = false
stylexml.load(styleFile)

set sourcexml = Server.CreateObject("MSXML2.FreeThreadedDOMDocument")
sourcexml.async = false

rs.Save sourcexml,1 ' Save as adPersistXML  <-UTF-8, see link below
set rs=Nothing


strPath=BuildPath(id,18)
dim xslty,xslProc
set xslt = Server.CreateObject("MSXML2.XSLTemplate")
xslt.stylesheet =stylexml
Set xslProc =xslt.createProcessor()
xslProc.input=sourcexml
xslProc.addParameter "Path",escape(strPath)
Response.charSet = "UTF-16"
xslProc.output = Response
xslProc.transform <- according to first link I gave u, u may try transformNodeToObject()
</code>



"A Recordset saved in XML format is saved using UTF-8 format. When such a file is loaded into an ADO Stream, the Stream object will not attempt to open a Recordset from the stream unless the Charset property of the stream is set to the appropriate value for UTF-8 format." (http://msdn.microsoft.com/library/default.asp?url=/library/en-us/ado270/htm/mdmthrstsave.asp[^])

Didn't that guy in other forum said it preserves your UTF-16? Suspicious | :suss:

I hope we moved on a little Smile | :)

[edit]
Do you have xml declaration WITH encoding, or at least meta tag with encoding in your resultant HTML file ?
[/edit]

David

Never forget: "Stay kul and happy" (I.A.)
GeneralRe: Unicode encoding problem Pin
teo_xp30-Jan-05 3:14
teo_xp30-Jan-05 3:14 
GeneralXML serialisation Pin
Member 157171627-Jan-05 22:11
Member 157171627-Jan-05 22:11 
GeneralXML 's Question Pin
jzb26-Jan-05 14:00
jzb26-Jan-05 14:00 
GeneralSQLXML3.0 Question Pin
mysorian26-Jan-05 11:59
professionalmysorian26-Jan-05 11:59 
GeneralRe: SQLXML3.0 Question Pin
DavidNohejl26-Jan-05 12:41
DavidNohejl26-Jan-05 12:41 
GeneralRe: SQLXML3.0 Question Pin
mysorian26-Jan-05 13:08
professionalmysorian26-Jan-05 13:08 
GeneralRe: SQLXML3.0 Question Pin
DavidNohejl26-Jan-05 13:38
DavidNohejl26-Jan-05 13:38 
GeneralRe: SQLXML3.0 Question Pin
mysorian26-Jan-05 17:58
professionalmysorian26-Jan-05 17:58 
GeneralInvalid Characters with MSXML Pin
Insert Cool Screen Name Here25-Jan-05 10:14
Insert Cool Screen Name Here25-Jan-05 10:14 
GeneralRe: Invalid Characters with MSXML Pin
DavidNohejl25-Jan-05 10:36
DavidNohejl25-Jan-05 10:36 
GeneralRe: Invalid Characters with MSXML Pin
Anonymous25-Jan-05 10:42
Anonymous25-Jan-05 10:42 
GeneralRe: Invalid Characters with MSXML Pin
Insert Cool Screen Name Here25-Jan-05 10:45
Insert Cool Screen Name Here25-Jan-05 10:45 
GeneralRe: Invalid Characters with MSXML Pin
DavidNohejl25-Jan-05 11:24
DavidNohejl25-Jan-05 11:24 
GeneralSimple Reports/ RTF output Pin
david@mindplay.com25-Jan-05 6:57
david@mindplay.com25-Jan-05 6:57 
GeneralRe: Simple Reports/ RTF output Pin
Mike Ellison25-Jan-05 8:27
Mike Ellison25-Jan-05 8:27 
GeneralRe: Simple Reports/ RTF output Pin
david@mindplay.com25-Jan-05 9:01
david@mindplay.com25-Jan-05 9:01 
GeneralRe: Simple Reports/ RTF output Pin
DavidNohejl25-Jan-05 10:13
DavidNohejl25-Jan-05 10:13 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.