abdera-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ugo Cei (JIRA)" <j...@apache.org>
Subject [jira] Resolved: (ABDERA-47) Incorrect character encoding in XML entry content
Date Wed, 16 May 2007 14:11:16 GMT

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

Ugo Cei resolved ABDERA-47.
---------------------------

    Resolution: Fixed

> Incorrect character encoding in XML entry content
> -------------------------------------------------
>
>                 Key: ABDERA-47
>                 URL: https://issues.apache.org/jira/browse/ABDERA-47
>             Project: Abdera
>          Issue Type: Bug
>    Affects Versions: 0.3.0
>            Reporter: Ugo Cei
>
> Sometimes, when setting XML content for an entry which contains non-ASCII characters,
there is some apparent corruption of data when reading back the same content. Here's a test
that demonstrates this:
> {code}
>   public void testAbderaEncodingHandling() throws Exception {
>       Abdera abdera = new Abdera();
>       Entry entry = abdera.newEntry();
>       entry.setId("http://example.com/entry/1");
>       entry.setTitle("Whatever");
>       entry.setUpdated(new Date());
>       Content content = entry.getFactory().newContent(Content.Type.XML);
>       String s = "<x>" + new Character((char) 224) + "</x>";
>       content.setValue(s);
>       content.setMimeType("application/xml+whatever");
>       entry.setContentElement(content);
>       assertNotNull(entry.getContent());
>       assertEquals(s, entry.getContent());
>   }
> {code}

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


Mime
View raw message