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

No Turkish support, toLowerCase() breaks #39

Closed
tresf opened this issue Mar 18, 2021 · 1 comment · Fixed by #40
Closed

No Turkish support, toLowerCase() breaks #39

tresf opened this issue Mar 18, 2021 · 1 comment · Fixed by #40

Comments

@tresf
Copy link
Contributor

tresf commented Mar 18, 2021

.toLowerCase() should have a locale forced, if not:

Expected:
windows_64

Actual:
wındows_64 (notice the "i" is incorrect)

@tresf
Copy link
Contributor Author

tresf commented Mar 18, 2021

Temporary workaround, for projects that can afford to force Locale:

    static {
        for(NativeLibraryUtil.Architecture arch : NativeLibraryUtil.Architecture.values()) {
            String test = arch.name().toLowerCase();
            String control = arch.name().toLowerCase(Locale.ENGLISH);
            if(!test.equals(control)) {
                log.warn("NativeLibraryUtil.Architecture value \"{}\" != \"{}\", setting Locale to Locale.ENGLISH per scijava/native-lib-loader#39", test, control);
                Locale.setDefault(Locale.ENGLISH);
                break;
            }
        }
    }

imagejan added a commit that referenced this issue Apr 10, 2021
imagejan added a commit to tresf/native-lib-loader that referenced this issue Apr 10, 2021
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

Successfully merging a pull request may close this issue.

1 participant