portals-jetspeed-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "JamesLiao (JIRA)" <jetspeed-...@portals.apache.org>
Subject [jira] Updated: (JS2-139) Make sure CastorFileSystemDocumentHandler always writes as UTF-8
Date Sat, 28 May 2005 03:24:52 GMT
     [ http://issues.apache.org/jira/browse/JS2-139?page=all ]

JamesLiao updated JS2-139:
--------------------------

    Attachment: CastorFileSystemDocumentHandler.java

I try to fix this bug by specify the OutputStream encoding as UTF-8 in CastorFileSystemDocumentHandler.updateDocument()
method.

......
File f = new File(this.documentRootDir, fileName);
        Writer writer = null;

        try
        {
//            writer = new FileWriter(f);
        	writer = new OutputStreamWriter(new FileOutputStream(f), "UTF-8");
            Serializer serializer = new XMLSerializer(writer, this.format);
            Marshaller marshaller = new Marshaller(serializer.asDocumentHandler());
            marshaller.setMapping(this.mapping);
            marshaller.marshal(document);
......

Please check it in attachment file.

> Make sure CastorFileSystemDocumentHandler always writes as UTF-8
> ----------------------------------------------------------------
>
>          Key: JS2-139
>          URL: http://issues.apache.org/jira/browse/JS2-139
>      Project: Jetspeed 2
>         Type: Bug
>   Components: PSML
>     Versions: 2.0-a1
>     Reporter: Scott T Weaver
>     Assignee: Scott T Weaver
>      Fix For: 2.0-a1
>  Attachments: CastorFileSystemDocumentHandler.java
>


-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-dev-unsubscribe@portals.apache.org
For additional commands, e-mail: jetspeed-dev-help@portals.apache.org


Mime
View raw message