Incorrect character encoding in XML entry content
-------------------------------------------------

                 Key: ABDERA-47
                 URL: https://issues.apache.org/jira/browse/ABDERA-47
             Project: Abdera
          Issue Type: Bug
            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.

Reply via email to