Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NativeSystem locale bug #42

Closed
norecha opened this issue Feb 1, 2015 · 1 comment
Closed

NativeSystem locale bug #42

norecha opened this issue Feb 1, 2015 · 1 comment

Comments

@norecha
Copy link

norecha commented Feb 1, 2015

NativeSystem class has a bug. Turkish I problem. Your toString() method inside the Family should call lowercase with Locale.ROOT argument. Otherwise Turkish Locale users will get
"Unable to extract the native library /org/jnativehook/lib/wındows/x86/JNativeHook.dll!"
for private static void loadNativeLibrary() method.

Notice the lowercase Turkish I, which is "ı" instead of "i".

See the javadoc of String.lowercase():

This method is locale sensitive, and may produce unexpected results if used for strings that are intended to be interpreted locale independently. Examples are programming language identifiers, protocol keys, and HTML tags. For instance, "TITLE".toLowerCase() in a Turkish locale returns "tıtle", where 'ı' is the LATIN SMALL LETTER DOTLESS I character. To obtain correct results for locale insensitive strings, use toLowerCase(Locale.ROOT).

@kwhat
Copy link
Owner

kwhat commented Feb 1, 2015

Has been resolved in master and branch 2.0. There should be a maintenance release by the end of February. If you need to work around the issue, take a look at the library locator API.

@kwhat kwhat closed this as completed Feb 1, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants