I have a paragraph of French to display on browser, if it is displayed directly by JSP, it works fine. But if I put the French to XML, and display through XSL to JSP, the French characters are in disorder. Not only French, the apostrophe '
is changed into question mark ?. Our environment is: Weblogic 6.1, JDK1.3, Solaris.
If it is on WIndows, no such problem.
Did any one have the same problem? It is appreciate to help me.
Thanks
George
-
Problem for French display in XML/XSL (7 messages)
- Posted by: George Li
- Posted on: May 16 2003 10:13 EDT
Threaded Messages (7)
- Problem for French display in XML/XSL by Kalin Komitski on May 16 2003 11:22 EDT
- Answer for by George Li on May 16 2003 13:19 EDT
-
Answer for by Kalin Komitski on May 17 2003 03:27 EDT
- XML encoding by George Li on May 21 2003 10:34 EDT
-
Answer for by Kalin Komitski on May 17 2003 03:27 EDT
- Answer for by George Li on May 16 2003 13:19 EDT
- Problem for French display in XML/XSL by Thomas Risberg on May 21 2003 12:58 EDT
- The problem is solved by George Li on May 23 2003 13:55 EDT
- Not all apostrophes are created equal by Marc Elbirt on July 12 2004 16:48 EDT
-
Problem for French display in XML/XSL[ Go to top ]
- Posted by: Kalin Komitski
- Posted on: May 16 2003 11:22 EDT
- in response to George Li
George,
Do you use the same XML parser on both environments ?
An XML parser is not supposed to support every encoding suitable for French however Unicode is a must so if this is the case try using Unicode.
Cheers
Kalin -
Answer for[ Go to top ]
- Posted by: George Li
- Posted on: May 16 2003 13:19 EDT
- in response to Kalin Komitski
Hi, Kalin
Yes, I use the same XML parser for WIndows and Solaris, The xml parser is defined by WebLogic JSP tag, I pasrser XML in JSP like the folowing piece of code. I also try XML encoding like "UTF-8" and "ISO-8859-1", neither works on Solaris.
<%@ taglib uri="xmlx.tld" prefix="x"%>
<HTML>
<HEAD>
<TITLE></TITLE>
</HEAD>
<BODY>
<% some things ... %>
<x:xslt stylesheet="mystyl.xsl">
<x:xml>
<%=responseXml ==null? "": responseXml%>
</x:xml>
</x:xslt>
</BODY>
</HTML> -
Answer for[ Go to top ]
- Posted by: Kalin Komitski
- Posted on: May 17 2003 03:27 EDT
- in response to George Li
Hi again,
In fact there are too many places encoding could be broken :-(
Just examine at every step where you actually lose the desired encoding.
... just a reminder ... when you changed the encoding to UTF-8 did you convert the xml file to UTF-8 or you simply changed the encoding attribute.
Kalin -
XML encoding[ Go to top ]
- Posted by: George Li
- Posted on: May 21 2003 10:34 EDT
- in response to Kalin Komitski
I simply changed the encoding attribute. But how to convert the XML file to UTF-8
Thanks
George -
Problem for French display in XML/XSL[ Go to top ]
- Posted by: Thomas Risberg
- Posted on: May 21 2003 12:58 EDT
- in response to George Li
George,
Don't know if it will help in your case, but we added the following switch to the JVM start in the startup script for WLS:
-Dfile.encoding=ISO-8859-1
We also use ISO-8859-1 as the xml encoding for any transformations.
Thomas
> I have a paragraph of French to display on browser, if it is displayed directly by JSP, it works fine. But if I put the French to XML, and display through XSL to JSP, the French characters are in disorder. Not only French, the apostrophe '
> is changed into question mark ?. Our environment is: Weblogic 6.1, JDK1.3, Solaris.
>
> If it is on WIndows, no such problem.
>
> Did any one have the same problem? It is appreciate to help me.
> Thanks
> George -
The problem is solved[ Go to top ]
- Posted by: George Li
- Posted on: May 23 2003 13:55 EDT
- in response to Thomas Risberg
Hi, Thomas
The problem is solved, I use
-Dfile.encoding=UTF-8
and encoding attribute to UTF-8 in XML file.
Thanks a lot
George -
Not all apostrophes are created equal[ Go to top ]
- Posted by: Marc Elbirt
- Posted on: July 12 2004 16:48 EDT
- in response to George Li
Check your text in a hex editor, and you will find that not all apostrophes are the same. There are two: &27 and &92. The ones that are 92 will often be converted to question marks (?).