db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Knut Anders Hatlen (JIRA)" <j...@apache.org>
Subject [jira] Updated: (DERBY-4902) Encoding problem in output from plan exporter
Date Mon, 15 Nov 2010 11:13:14 GMT

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

Knut Anders Hatlen updated DERBY-4902:
--------------------------------------

    Attachment: d4902.diff

The problem seems to be caused by an inconsistency in CreateXMLFile.writeTheXMLFile(). The
header in the generated XML file says that the encoding is ISO-8859-1, but the code the code
that produces the output uses the default encoding of the runtime environment.

The attached patch makes writeTheXMLFile() use UTF-8 consistently (and explicitly). This solved
the problem for me both in the XML output and in the HTML output. The patch also adds a test
case that runs cleanly with the fix, and fails with the following error without the fix:

1) testPlanExporterEncoding(org.apache.derbyTesting.functionTests.tests.lang.XplainStatisticsTest)junit.framework.ComparisonFailure:
expected:<...LECT * FROM D4902_BL[ÅBÆ]R> but was:<...LECT * FROM D4902_BL[ÅBÆ]R>

> Encoding problem in output from plan exporter
> ---------------------------------------------
>
>                 Key: DERBY-4902
>                 URL: https://issues.apache.org/jira/browse/DERBY-4902
>             Project: Derby
>          Issue Type: Bug
>          Components: Tools
>    Affects Versions: 10.7.1.0
>            Reporter: Knut Anders Hatlen
>            Assignee: Knut Anders Hatlen
>            Priority: Minor
>         Attachments: d4902.diff
>
>
> If I execute a query with non-ASCII characters in it, the output from the plan exporter
tool is garbled.
> Example query: select * from blåbær
> The HTML output looks like this in the browser: Query: select * from blåbær
> Similar problem with XML: <statement>select * from blåbær</statement>

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