cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "xu ma" <m...@cobalt.co.jp>
Subject I can't display Japanese rightly(new problem)
Date Mon, 18 Dec 2000 12:49:02 GMT
Thank you very much, now it works fine.

But now, I've got an another problem.When searching some contents from
database with Japanese code as a key , below's error was returned:

Error found handling the request.
org.xml.sax.SAXParseException: An invalid XML character (Unicode: 0x1b) was
found in the element content of the document.
	at
org.apache.cocoon.parser.AbstractParser.fatalError(AbstractParser.java:105)
	at org.apache.xerces.framework.XMLParser.reportError(XMLParser.java:1037)
	at
org.apache.xerces.framework.XMLDocumentScanner.reportFatalXMLError(XMLDocume
ntScanner.java:643)
	at
org.apache.xerces.framework.XMLDocumentScanner$ContentDispatcher.dispatch(XM
LDocumentScanner.java:1355)
	at
org.apache.xerces.framework.XMLDocumentScanner.parseSome(XMLDocumentScanner.
java:380)
	at org.apache.xerces.framework.XMLParser.parse(XMLParser.java:900)
	at org.apache.cocoon.parser.XercesParser.parse(XercesParser.java:84)
	at org.apache.cocoon.parser.AbstractParser.parse(AbstractParser.java:83)
	at
org.apache.cocoon.producer.ProducerFromFile.getDocument(ProducerFromFile.jav
a:78)
	at org.apache.cocoon.Engine.handle(Engine.java:340)
	at org.apache.cocoon.Cocoon.service(Cocoon.java:167)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
	at
org.apache.tomcat.core.ServletWrapper.handleRequest(ServletWrapper.java:503)
	at org.apache.tomcat.core.ContextManager.service(ContextManager.java:559)
	at
org.apache.tomcat.service.http.HttpConnectionHandler.processConnection(HttpC
onnectionHandler.java:160)
	at
org.apache.tomcat.service.TcpConnectionThread.run(SimpleTcpEndpoint.java:338
)
	at java.lang.Thread.run(Thread.java:475)


My xml file is as below:

<?xml version="1.0" encoding="Shift_JIS"?>

<?cocoon-process type="xsp"?>
<?cocoon-process type="xslt"?>
<?xml-stylesheet type="text/xsl" href="esql.xsl"?>

<xsp:page
  xmlns:esql="http://apache.org/cocoon/SQL/v2"
  xmlns:xsp="http://www.apache.org/1999/XSP/Core"
>

<page>

<esql:connection>
  <esql:driver>org.postgresql.Driver</esql:driver>
  <esql:dburl>jdbc:postgresql://localhost/web3d2?encoding=SJIS</esql:dburl>
  <esql:username>web3d</esql:username>
  <esql:password></esql:password>
  <esql:execute-query>
    <esql:query>select * from part_table where part_name_jp='静脈
'</esql:query>
    <esql:results>
      <header>header info</header>
      <esql:row-results>
        <department>
          <id><esql:get-int column="part_id"/></id>
          <name><esql:get-string encoding='"SJIS"'
column="part_name_jp"/></name>
        </department>
      </esql:row-results>
      <footer>footer info</footer>
    </esql:results>
  </esql:execute-query>
</esql:connection>
</page>

</xsp:page>

And I also can't insert Japanese code into database rightly(not Japanese
code, '?' had been added into database). Even though there is not any error
occured.
how do I do ? Help me!
Thanks to any replys.

xu ma
maxu@cobalt.co.jp



Mime
View raw message