[
https://issues.apache.org/jira/browse/DERBY-4806?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12915288#action_12915288
]
Knut Anders Hatlen commented on DERBY-4806:
-------------------------------------------
+ try {
+ // DERBY-4806 Should use UTF-8 according to
+ //
http://www.w3.org/TR/html40/appendix/notes.html#non-ascii-chars
+ // to get the string of the file name
+ return URLDecoder.decode(result.toString(), "UTF-8");
+ } catch (UnsupportedEncodingException e) {
+ // All JVMs are required to support UTF-8.
+ return Main.getTextMessage("SIF01.W", e.getMessage());
+ }
The comment correctly states that all JVMs are required to support UTF-8, so
the UnsupportedEncodingException is never supposed to happen. Most other places
we just ignore the UnsupportedEncodingException if we know it can't happen, or
have a THROWASSERT in a debug block for extra sanity checking. Not a big issue,
but I'd prefer that we didn't add a new message (SIF01.W) for something that
should never happen, so that we save the translators some unnecessary work.
What about just returning e.getMessage() in the case of
UnsupportedEncodingException here, similar to what you did with IOException in
formatURL()?
> SysinfoCPCheckTest fail on different Windows platforms on 10.6.2.0 release
> candidate
> -------------------------------------------------------------------------------------
>
> Key: DERBY-4806
> URL: https://issues.apache.org/jira/browse/DERBY-4806
> Project: Derby
> Issue Type: Improvement
> Components: Test
> Affects Versions: 10.6.1.0
> Environment: Windows
> Reporter: Lily Wei
> Priority: Minor
> Attachments: DERBY-4806-1.diff, DERBY-4806-2.diff, rjall.out
>
>
> For the preliminary platform testing [1] Kathey, Dag and Lily
> have seen SysinfoCPCheckTest fail on different Windows platforms(XP and
> Windows 7) when
> run as part of suitesAll.
> [1] http://wiki.apache.org/db-derby/TenSixTwoPlatformTesting
> Thanks to Myrna points out that it could relate to DERBY-3771.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.