You are viewing a plain text version of this content. The canonical link for it is here.
Posted to derby-dev@db.apache.org by "Knut Anders Hatlen (JIRA)" <ji...@apache.org> on 2010/11/15 10:56:15 UTC

[jira] Created: (DERBY-4902) Encoding problem in output from plan exporter

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


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.


[jira] Updated: (DERBY-4902) Encoding problem in output from plan exporter

Posted by "Knut Anders Hatlen (JIRA)" <ji...@apache.org>.
     [ 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.


[jira] Closed: (DERBY-4902) Encoding problem in output from plan exporter

Posted by "Knut Anders Hatlen (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/DERBY-4902?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Knut Anders Hatlen closed DERBY-4902.
-------------------------------------

       Resolution: Fixed
    Fix Version/s: 10.7.1.0

All the regression tests ran cleanly.

Committed revision 1035238.

> 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
>             Fix For: 10.7.1.0
>
>         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.