[
https://issues.apache.org/jira/browse/LUCENE-6563?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14614652#comment-14614652
]
Dawid Weiss commented on LUCENE-6563:
-------------------------------------
This is indeed an interesting one.
{{sun.jnu.encoding}} is a very deep, internal, JVM-specific and largely
undocumented property that controls how unicode characters are mapped into
bytes to encode file names. Looking at OpenJDK code I think it dates back to
times when most filesystem-related APIs were byte-based (not unicode-based), so
such a conversion was required to somehow translate Java's default string
representation into operating system's defaults.
OpenJDK tries to figure it out internally (on Windows and on Unix systems) with
{{sun.jnu.encoding}} functioning as an override.
I don't think the patch should be incorporated though. This is an attempt to
dodge an odd behavior of the JVM itself; if you specify LANG=C then this means
that the JVM won't be able to write any filenames with non-ASCII characters.
The test is failing and I think it *should be* failing -- it fails exactly at
the check it was supposed to do. We shouldn't be trying to improve the defaults.
I think there are two solutions -- either we agree that all Lucene-related
filesystem operations use only ASCII (and this can be verified at mock
filesystem level), then the test can be corrected as well. Or we agree that
filesystems with crippled unicode support are not supported. Then the test
should keep failing (with a better message perhaps).
> sun.jnu.encoding to match file.encoding system property
> (MockFileSystemTestCase.testURI)
> ----------------------------------------------------------------------------------------
>
> Key: LUCENE-6563
> URL: https://issues.apache.org/jira/browse/LUCENE-6563
> Project: Lucene - Core
> Issue Type: Wish
> Reporter: Christine Poerschke
> Priority: Minor
>
> {{ant test -Dtestcase=TestVerboseFS -Dtests.method=testURI
> -Dtests.file.encoding=UTF-8}} fails (for example) with 'Oracle Corporation
> 1.8.0_45 (64-bit)' when the default {{sun.jnu.encoding}} system property is
> (for example) {{ANSI_X3.4-1968}}
> [details to follow]
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]