PARQUET-430: Change to use Locale parameterized version of String.toUpperCase()/toLowerCase - #312
Closed
lw-lin wants to merge 1 commit into
Closed
PARQUET-430: Change to use Locale parameterized version of String.toUpperCase()/toLowerCase#312lw-lin wants to merge 1 commit into
lw-lin wants to merge 1 commit into
Conversation
Contributor
Author
|
@rdblue @liancheng Would you please take a look at this? Cheers. |
Contributor
|
LGTM although I'm not quite sure whether it's absolutely necessary... |
Contributor
Author
|
@liancheng
For instance, this code snippet reproduces an Exception when the default locale is tr: Exception is:
Thanks. |
Contributor
|
Agree, +1. @rdblue Would you mind to also take a look? |
Member
|
+1 |
piyushnarang
pushed a commit
to piyushnarang/parquet-mr
that referenced
this pull request
Jun 15, 2016
…pperCase()/toLowerCase A String is being converted to upper or lowercase, using the platform's default encoding. This may result in improper conversions when used with international characters. For instance, "TITLE".toLowerCase() in a Turkish locale returns "tıtle", where 'ı' -- without a dot -- is the LATIN SMALL LETTER DOTLESS I character. To obtain correct results for locale insensitive strings, we'd better use toLowerCase(Locale.ENGLISH). For more information on this, please see: - http://stackoverflow.com/questions/11063102/using-locales-with-javas-tolowercase-and-touppercase - http://lotusnotus.com/lotusnotus_en.nsf/dx/dotless-i-tolowercase-and-touppercase-functions-use-responsibly.htm - http://java.sys-con.com/node/46241 This PR changes our use of String.toUpperCase()/toLowerCase() to String.toUpperCase(Locale.*ENGLISH*)/toLowerCase(*Locale.ENGLISH*) Author: proflin <proflin.me@gmail.com> Closes apache#312 from proflin/PARQUET-430 and squashes the following commits: ed55822 [proflin] PARQUET-430
rdblue
pushed a commit
to rdblue/parquet-mr
that referenced
this pull request
Jul 13, 2016
…pperCase()/toLowerCase A String is being converted to upper or lowercase, using the platform's default encoding. This may result in improper conversions when used with international characters. For instance, "TITLE".toLowerCase() in a Turkish locale returns "tıtle", where 'ı' -- without a dot -- is the LATIN SMALL LETTER DOTLESS I character. To obtain correct results for locale insensitive strings, we'd better use toLowerCase(Locale.ENGLISH). For more information on this, please see: - http://stackoverflow.com/questions/11063102/using-locales-with-javas-tolowercase-and-touppercase - http://lotusnotus.com/lotusnotus_en.nsf/dx/dotless-i-tolowercase-and-touppercase-functions-use-responsibly.htm - http://java.sys-con.com/node/46241 This PR changes our use of String.toUpperCase()/toLowerCase() to String.toUpperCase(Locale.*ENGLISH*)/toLowerCase(*Locale.ENGLISH*) Author: proflin <proflin.me@gmail.com> Closes apache#312 from proflin/PARQUET-430 and squashes the following commits: ed55822 [proflin] PARQUET-430
rdblue
pushed a commit
to rdblue/parquet-mr
that referenced
this pull request
Jan 6, 2017
…pperCase()/toLowerCase A String is being converted to upper or lowercase, using the platform's default encoding. This may result in improper conversions when used with international characters. For instance, "TITLE".toLowerCase() in a Turkish locale returns "tıtle", where 'ı' -- without a dot -- is the LATIN SMALL LETTER DOTLESS I character. To obtain correct results for locale insensitive strings, we'd better use toLowerCase(Locale.ENGLISH). For more information on this, please see: - http://stackoverflow.com/questions/11063102/using-locales-with-javas-tolowercase-and-touppercase - http://lotusnotus.com/lotusnotus_en.nsf/dx/dotless-i-tolowercase-and-touppercase-functions-use-responsibly.htm - http://java.sys-con.com/node/46241 This PR changes our use of String.toUpperCase()/toLowerCase() to String.toUpperCase(Locale.*ENGLISH*)/toLowerCase(*Locale.ENGLISH*) Author: proflin <proflin.me@gmail.com> Closes apache#312 from proflin/PARQUET-430 and squashes the following commits: ed55822 [proflin] PARQUET-430
rdblue
pushed a commit
to rdblue/parquet-mr
that referenced
this pull request
Jan 10, 2017
…pperCase()/toLowerCase A String is being converted to upper or lowercase, using the platform's default encoding. This may result in improper conversions when used with international characters. For instance, "TITLE".toLowerCase() in a Turkish locale returns "tıtle", where 'ı' -- without a dot -- is the LATIN SMALL LETTER DOTLESS I character. To obtain correct results for locale insensitive strings, we'd better use toLowerCase(Locale.ENGLISH). For more information on this, please see: - http://stackoverflow.com/questions/11063102/using-locales-with-javas-tolowercase-and-touppercase - http://lotusnotus.com/lotusnotus_en.nsf/dx/dotless-i-tolowercase-and-touppercase-functions-use-responsibly.htm - http://java.sys-con.com/node/46241 This PR changes our use of String.toUpperCase()/toLowerCase() to String.toUpperCase(Locale.*ENGLISH*)/toLowerCase(*Locale.ENGLISH*) Author: proflin <proflin.me@gmail.com> Closes apache#312 from proflin/PARQUET-430 and squashes the following commits: ed55822 [proflin] PARQUET-430
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
A String is being converted to upper or lowercase, using the platform's default encoding. This may result in improper conversions when used with international characters.
For instance, "TITLE".toLowerCase() in a Turkish locale returns "tıtle", where 'ı' -- without a dot -- is the LATIN SMALL LETTER DOTLESS I character. To obtain correct results for locale insensitive strings, we'd better use toLowerCase(Locale.ENGLISH).
For more information on this, please see:
This PR changes our use of String.toUpperCase()/toLowerCase() to String.toUpperCase(Locale.ENGLISH)/toLowerCase(Locale.ENGLISH)