[ 
https://issues.apache.org/jira/browse/COCOON-2063?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Jörg Heinicke updated COCOON-2063:
----------------------------------

    Affects version (Component): Parent values: Blocks: HTML(10168). Level 1 
values: 1.0.0-M1(10198). 
        Fix version (Component): Parent values: Blocks: HTML(10240). Level 1 
values: 1.0.0-RC1(10271). 
                       Priority: Minor  (was: Major)
              Affects Version/s:     (was: 2.2)
                  Fix Version/s: 2.2-dev (Current SVN)
                       Assignee: Jörg Heinicke

I fixed this issue in 2.2. The fix in 2.1 does not work since it uses java.nio 
which was only added in Java 1.4. Cocoon 2.1 has to be Java 1.3 compatible. Is 
there a way to find out the default encoding in Java 1.3? All the classes and 
methods were it would be necessary like new String(byte[]) or 
InputStreamReader() only point to 
http://java.sun.com/j2se/1.3/docs/api/java/lang/package-summary.html#charenc 
which just names some constants. With Mac OS X I also have no access to the 
source code of the JDK. The bytecode implies that the mentioned classes and 
methods use some Sun-internal class to retrieve the default encoding.

> NekoHTMLTransformer needs to set the default-encoding of the current system 
> to work properly with UTF-8
> -------------------------------------------------------------------------------------------------------
>
>                 Key: COCOON-2063
>                 URL: https://issues.apache.org/jira/browse/COCOON-2063
>             Project: Cocoon
>          Issue Type: Bug
>          Components: Blocks: HTML
>    Affects Versions: 2.1.11
>            Reporter: Alexander Klimetschek
>            Assignee: Jörg Heinicke
>            Priority: Minor
>             Fix For: 2.2-dev (Current SVN)
>
>         Attachments: NekoHTMLGenerator_BRANCH2_1_X.patch, 
> nekohtmltransformer-encoding.patch
>
>
> The NekoHTMLTransformer uses the cyberneko HTMLConfiguration for tidying 
> html. Unfortunately it does not use the system's current encoding as default, 
> instead you have to set a property to set your encoding. But this varies from 
> one OS to another, so the best solution is to set this property automatically 
> in the NekoHTMLTransformer depending on what Java uses as defaultCharset:
>             
> config.setProperty("http://cyberneko.org/html/properties/default-encoding";, 
> Charset.defaultCharset().name());

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to