You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@abdera.apache.org by "Ugo Cei (JIRA)" <ji...@apache.org> on 2007/05/16 12:14:16 UTC

[jira] Updated: (ABDERA-47) Incorrect character encoding in XML entry content

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

Ugo Cei updated ABDERA-47:
--------------------------

    Affects Version/s: 0.3.0

> 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.