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

Sorting a string #3

Open
GoogleCodeExporter opened this issue Mar 24, 2015 · 0 comments
Open

Sorting a string #3

GoogleCodeExporter opened this issue Mar 24, 2015 · 0 comments

Comments

@GoogleCodeExporter
Copy link

What steps will reproduce the problem?
1. Sorting column with String with capitals and lower case characters

What is the expected output? What do you see instead?
Column is sorted first on capitals decent lower case

What version of the product are you using? On what operating system?
Windows xp newest version....

Please provide any additional information below.
Made my own fix.. Just an small update for you

------------
Instead of  

compareResult = column1.compareTo(column2); on SortComparator.java

use

if(column1 instanceof String){
    String col1 = ((String)column1).toLowerCase();
    String col2 = ((String)column2).toLowerCase();
    compareResult = col1.compareTo(col2);
}
else
    compareResult = column1.compareTo(column2);


Original issue reported on code.google.com by appienva...@gmail.com on 7 Jul 2008 at 9:46

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant