You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Vincent Siveton (JIRA)" <ji...@codehaus.org> on 2007/11/09 13:27:35 UTC

[jira] Created: (DOXIA-185) Add encoding support

Add encoding support
--------------------

                 Key: DOXIA-185
                 URL: http://jira.codehaus.org/browse/DOXIA-185
             Project: Maven Doxia
          Issue Type: Improvement
          Components: Sink API
    Affects Versions: 1.0-alpha-10
            Reporter: Vincent Siveton




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

        

[jira] Commented: (DOXIA-185) Add encoding support

Posted by "Vincent Siveton (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/DOXIA-185?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=147507#action_147507 ] 

Vincent Siveton commented on DOXIA-185:
---------------------------------------

Lukas, the only need that I see is for xml files and specially for XhtmlSink. We need to find a way to add:

{noformat}
<?xml version="1.0" encoding="UTF-8"?>
{noformat}

and 

{noformat}
<meta http-equiv=content-type content="text/html; charset=UTF-8">
{noformat}

> Add encoding support
> --------------------
>
>                 Key: DOXIA-185
>                 URL: http://jira.codehaus.org/browse/DOXIA-185
>             Project: Maven Doxia
>          Issue Type: Improvement
>          Components: Sink API
>    Affects Versions: 1.0-alpha-10
>            Reporter: Vincent Siveton
>


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

        

[jira] Commented: (DOXIA-185) Add encoding support

Posted by "Vincent Siveton (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/DOXIA-185?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=133533#action_133533 ] 

Vincent Siveton commented on DOXIA-185:
---------------------------------------

Actually yes it is but do we want to add character encoding directly in Doxia files like HTML does [1]? 

[1] http://www.w3.org/TR/html4/types.html


> Add encoding support
> --------------------
>
>                 Key: DOXIA-185
>                 URL: http://jira.codehaus.org/browse/DOXIA-185
>             Project: Maven Doxia
>          Issue Type: Improvement
>          Components: Sink API
>    Affects Versions: 1.0-alpha-10
>            Reporter: Vincent Siveton
>


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

        

[jira] Commented: (DOXIA-185) Add encoding support

Posted by "Vincent Siveton (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/DOXIA-185?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_120767 ] 

Vincent Siveton commented on DOXIA-185:
---------------------------------------

I mean in the Skin API

> Add encoding support
> --------------------
>
>                 Key: DOXIA-185
>                 URL: http://jira.codehaus.org/browse/DOXIA-185
>             Project: Maven Doxia
>          Issue Type: Improvement
>          Components: Sink API
>    Affects Versions: 1.0-alpha-10
>            Reporter: Vincent Siveton
>


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

        

[jira] Commented: (DOXIA-185) Add encoding support

Posted by "Vincent Siveton (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/DOXIA-185?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=149504#action_149504 ] 

Vincent Siveton commented on DOXIA-185:
---------------------------------------

After some discussions with Hervé, here are a summary:
- apt sink produces ASCII document
- xml sinks produce UTF-8 documents

What to do with others text sinks like twiki or confluence? I proposed to escape all characters similar to APT.

> Add encoding support
> --------------------
>
>                 Key: DOXIA-185
>                 URL: http://jira.codehaus.org/browse/DOXIA-185
>             Project: Maven Doxia
>          Issue Type: Improvement
>          Components: Sink API
>    Affects Versions: 1.0-alpha-10
>            Reporter: Vincent Siveton
>         Attachments: DOXIA-185.diff
>
>


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

       

[jira] Commented: (DOXIA-185) Add encoding support

Posted by "Lukas Theussl (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/DOXIA-185?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=133653#action_133653 ] 

Lukas Theussl commented on DOXIA-185:
-------------------------------------

For xml files this is already done: DOXIA-133. For text files one would have to specify how to indicate an encoding on a per-file basis, eg via some meta-information. But in any case, the file encoding would have to be detected by some peek-ahead, ie outside doxia, to construct the Reader, like it's done by the ReaderFactory.newXmlReader in the xml case. So I don't think it's necessary to modify the Sink API.

> Add encoding support
> --------------------
>
>                 Key: DOXIA-185
>                 URL: http://jira.codehaus.org/browse/DOXIA-185
>             Project: Maven Doxia
>          Issue Type: Improvement
>          Components: Sink API
>    Affects Versions: 1.0-alpha-10
>            Reporter: Vincent Siveton
>


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

        

[jira] Updated: (DOXIA-185) Add encoding support

Posted by "Vincent Siveton (JIRA)" <ji...@codehaus.org>.
     [ http://jira.codehaus.org/browse/DOXIA-185?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Vincent Siveton updated DOXIA-185:
----------------------------------

    Attachment: DOXIA-185.diff

Trivial patch need to be reviewed

> Add encoding support
> --------------------
>
>                 Key: DOXIA-185
>                 URL: http://jira.codehaus.org/browse/DOXIA-185
>             Project: Maven Doxia
>          Issue Type: Improvement
>          Components: Sink API
>    Affects Versions: 1.0-alpha-10
>            Reporter: Vincent Siveton
>         Attachments: DOXIA-185.diff
>
>


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

        

[jira] Commented: (DOXIA-185) Add encoding support

Posted by "Lukas Theussl (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/DOXIA-185?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=133531#action_133531 ] 

Lukas Theussl commented on DOXIA-185:
-------------------------------------

The encoding of source/target files is set in the Reader/Writer of a Parser/Sink, ie outside of doxia.So I don't understand why this should be necessary or useful, or am I missing something?

> Add encoding support
> --------------------
>
>                 Key: DOXIA-185
>                 URL: http://jira.codehaus.org/browse/DOXIA-185
>             Project: Maven Doxia
>          Issue Type: Improvement
>          Components: Sink API
>    Affects Versions: 1.0-alpha-10
>            Reporter: Vincent Siveton
>


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

        

[jira] Issue Comment Edited: (DOXIA-185) Add encoding support

Posted by "Vincent Siveton (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/DOXIA-185?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_120767 ] 

siveton edited comment on DOXIA-185 at 1/21/08 7:24 AM:
----------------------------------------------------------------

I mean in the Sink API

      was (Author: siveton):
    I mean in the Skin API
  
> Add encoding support
> --------------------
>
>                 Key: DOXIA-185
>                 URL: http://jira.codehaus.org/browse/DOXIA-185
>             Project: Maven Doxia
>          Issue Type: Improvement
>          Components: Sink API
>    Affects Versions: 1.0-alpha-10
>            Reporter: Vincent Siveton
>


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

        

[jira] Commented: (DOXIA-185) Add encoding support

Posted by "Herve Boutemy (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/DOXIA-185?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=147608#action_147608 ] 

Herve Boutemy commented on DOXIA-185:
-------------------------------------

Adding the meta tag for pure XML, with an XML prolog {code:xml}<?xml version="1.0" ?>{code} isn't really useful: the prolog defines encoding, either implictely (UTF-8 by default) or explicitely

Adding the meta-tag is needed when there is no XML prolog: in this case, without the meta-tag, you can't know which encoding was used when writing the content. (XHTML without XML prolog but with meta-tag isn't really XML since it does not conform XML encoding convention, but that's another story).

Then you should either add the XML prolog or the meta-tag, but both isn't really useful.


>From an API point of view, this requires the Sink API to know what encoding was used to create the Writer.


About the proposed patch: Sink API is about output.
Having an inputEncoding attribute doesn't make sense: Parser API could eventually have this attribute set along the Reader using the input encoding.

To pass encoding to the Sink when rendering output, RenderingContext should be used, either by adding an outputEncoding attribute or using the attributes Map

> Add encoding support
> --------------------
>
>                 Key: DOXIA-185
>                 URL: http://jira.codehaus.org/browse/DOXIA-185
>             Project: Maven Doxia
>          Issue Type: Improvement
>          Components: Sink API
>    Affects Versions: 1.0-alpha-10
>            Reporter: Vincent Siveton
>         Attachments: DOXIA-185.diff
>
>


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