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 Kathey Marsden <km...@sbcglobal.net> on 2008/11/21 01:33:21 UTC
Observations on LocalizedDisplayScriptTest
Recently I have been looking at this test because I was debugging a jvm
specific failure and I noticed the following.
1) The system property derby.ui.codeset does not have any effect because
the script is run with runScript which takes its own encoding parameter.
The file always gets read in US-ASCII even though the file format is
Cp932. (It uses the constructor for ScriptTestCase that sets the
encoding to US-ASCII.)
2) The test seems to be testing LOCALIZEDDISPLAY ON which would only
affect date and time output format and not have anything to do with the
special characters in the test.
It seems like it might make the test easier to manage if we took out the
ncharc column of the table and the special characters, took
derby.ui.codeset out of the test and just had an ascii sql file and master.
Thoughts?
Kathey
Re: Observations on LocalizedDisplayScriptTest
Posted by Kathey Marsden <km...@sbcglobal.net>.
Knut Anders Hatlen wrote:
>
> It might be OK to remove the non-ascii characters from that test, but I
> still think it's worth testing that derby.ui.codeset works. Do we have
> other tests for that currently?
>
>
The following tests use derby.ui.codeset:
i18n/LocalizedAttributeScriptTest.java
i18n/LocalizedDisplayScriptTest.java
tools/SysinfoLocaleTest.java
I assume LocalizedAttributeScriptTest has the same problem as
LocalizedDisplayScriptTest case, (but I haven't checked.) Since they use
runScript the derby.ui.codeset is not used. SysinfoLocaleTest tests the
ouput of Sysinfo in UTF-8 format. It seems like it would be good to file
a Jira to test derby.ui.codeset. I think it confuses the issue to try
to combine that testing with LocalizedDisplayScriptTest and we should
use a codeset supported by all the jvms, not Cp932 which is only
supported by IBM JVM's. I must say also that I am a bit confused about
the scope of derby.ui.codeset, especially when running scripts. It
might be good as part of the exercise of writing a new test, we beefed
up the documentation some too.
Thanks
Kathey
Re: Observations on LocalizedDisplayScriptTest
Posted by Knut Anders Hatlen <Kn...@Sun.COM>.
Kathey Marsden <km...@sbcglobal.net> writes:
> Recently I have been looking at this test because I was debugging a
> jvm specific failure and I noticed the following.
>
> 1) The system property derby.ui.codeset does not have any effect
> because the script is run with runScript which takes its own encoding
> parameter. The file always gets read in US-ASCII even though the file
> format is Cp932. (It uses the constructor for ScriptTestCase that sets
> the encoding to US-ASCII.)
> 2) The test seems to be testing LOCALIZEDDISPLAY ON which would only
> affect date and time output format and not have anything to do with
> the special characters in the test.
>
> It seems like it might make the test easier to manage if we took out
> the ncharc column of the table and the special characters, took
> derby.ui.codeset out of the test and just had an ascii sql file and
> master.
>
> Thoughts?
Hi Kathey,
I have posted similar observations earlier in comments to DERBY-1726. I
reopened the issue now to get those comments addressed, and I also
pointed to this thread.
It might be OK to remove the non-ascii characters from that test, but I
still think it's worth testing that derby.ui.codeset works. Do we have
other tests for that currently?
--
Knut Anders