cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Krzysztof ZieliƱski <KZielin...@supermedia.pl>
Subject Re: FP Lost encoding after write.
Date Mon, 02 Oct 2000 07:42:10 GMT
Hi.

I have changed orginal  source fpResource.java

 String workEncoding = "UTF-8";
 ....
 public Document loadDocument(File f, Hashtable errors) {
  // removed till Xerces 1.1.2 is working
  //RevalidatingDOMParser parser = new RevalidatingDOMParser();
  DOMParser parser = new DOMParser();
  try {
   //System.out.println("about to parse Document");
   InputSource is = new InputSource("file:" + f.toString());
   String enc = is.getEncoding();
   if (enc != "") {
    workEncoding = enc;
   }
   parser.parse(is);
to
 String workEncoding = "ISO-8859-2";
 ....
 public Document loadDocument(File f, Hashtable errors) {
  // removed till Xerces 1.1.2 is working
  //RevalidatingDOMParser parser = new RevalidatingDOMParser();
  DOMParser parser = new DOMParser();
  try {
   //System.out.println("about to parse Document");
   InputSource is = new InputSource("file:" + f.toString());
   String enc = is.getEncoding();
   if (enc != "") {
//   workEncoding = enc;
   }
   parser.parse(is);




After modification (remove workEncoding = enc;) a new file (index.xml) is
corect. I think that doesn't work
   InputSource is = new InputSource("file:" + f.toString());
   String enc = is.getEncoding();


So now I have always result document encoding in ISO-8859-2
<?xml version="1.0" encoding="ISO-8859-2" ?>
but I still lost my polish characters encoding, they are changing to '?'.
Where I have to modify source to fix this trouble?

May by I need make some more modification in cocoon.conf
formatter.text/xml.encoding = ISO-8859-2
formatter.text/html.encoding = ISO-8859-2
formatter.text/xhtml.encoding = ISO-8859-2
formatter.text/html/loose.encoding = ISO-8859-2


Krzysztof Zielinski
KZielinski@SuperMedia.pl
ICQ # 47933362



Mime
View raw message