You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jetspeed-dev@portals.apache.org by "JamesLiao (JIRA)" <je...@portals.apache.org> on 2005/05/28 05:24:52 UTC

[jira] Updated: (JS2-139) Make sure CastorFileSystemDocumentHandler always writes as UTF-8

     [ 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