The following comment has been added to this issue:
Author: J. Patterson Waltz III
Created: Tue, 9 Nov 2004 12:20 PM
Body:
I agree that it would be very useful to be able to sort column contents using a
Collator, in order to get linguistic, rather than lexicographic ordering of
values. In any implementation which is based on the Collator.compare() method,
it would be useful be able set not only the current Locale, but also the
Collator's strength (whether to differentiate upper/lower case and
accented/non-accented characters) and decomposition (how the actual string is
decomposed into a sortable character sequence *before* sorting: � -> a`)
fields. It could be beneficial to have the option to set these two additional
values globally with an option to override them on a per-table and per-column
basis.
---------------------------------------------------------------------
View this comment:
http://jira.codehaus.org/browse/DISPL-77?page=comments#action_26241
---------------------------------------------------------------------
View the issue:
http://jira.codehaus.org/browse/DISPL-77
Here is an overview of the issue:
---------------------------------------------------------------------
Key: DISPL-77
Summary: Account for extended ascii strings when sorting
Type: Bug
Status: Unassigned
Priority: Major
Original Estimate: Unknown
Time Spent: Unknown
Remaining: Unknown
Project: DisplayTag
Components:
Paging/Sorting
Versions:
1.0 RC1
Assignee:
Reporter: fabrizio giustina
Created: Fri, 22 Oct 2004 7:40 AM
Updated: Tue, 9 Nov 2004 12:20 PM
Description:
====
imported from sf tracker
id 949485
submitted by karlhungus - karlhungus
http://sourceforge.net/support/tracker.php?aid=949485
====
Feature: take extended ascii into account when sorting
strings
Solutions:
-Option 1
in RowSorter.checkNullsAndCompare
change the last else condition:
<code> // if object are not null and don't
implement comparable, compare using string values
returnValue =
object1.toString().compareTo(object2.toString());</code>
to:
<code>Collator.getInstance().compare(object1.toString(),
object2.toString());</code>
It's simple and it basicly solves the problem
-Option 2
When creating the TableModel in TableTag pass in the
locale and make it an attribute of RowSorter, then
<code>Collator.getInstance(locale).compare(object1.toString(),
object2.toString());</code>
It's a little more impacting but it sovles the problem
more generally
---------------------------------------------------------------------
JIRA INFORMATION:
This message is automatically generated by JIRA.
If you think it was sent incorrectly contact one of the administrators:
http://jira.codehaus.org/secure/Administrators.jspa
If you want more information on JIRA, or have a bug to report see:
http://www.atlassian.com/software/jira
-------------------------------------------------------
This SF.Net email is sponsored by:
Sybase ASE Linux Express Edition - download now for FREE
LinuxWorld Reader's Choice Award Winner for best database on Linux.
http://ads.osdn.com/?ad_idU88&alloc_id065&op=click
_______________________________________________
displaytag-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/displaytag-devel