View Single Post
Old 11-24-2012, 02:06 PM   #11
NiLuJe
BLAM!
NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.
 
NiLuJe's Avatar
 
Posts: 5,258
Karma: 5220787
Join Date: Jun 2010
Location: Paris, France
Device: Kindle 2i, 3g, 4, 5w, PW & PW2; Kobo H2O
@HarryT: Nope, the sort order changed. (It's was already different between the K3 & the Touch, but it's even different from the Touch on the PW...).

The underscore happened to be near the top of the list both on the 3 & the Touch, so it was indeed a good choice, but not anymore ;/.

Code:
# Kindle ignores these characters and sorts them randomly (unless name is only invisible characters:!
SORT_INVISIBLE = u'-?/]#.\'\\*})&:@%;"!,'  # means the visible are " _`^~'([{$+<=>|" + 0-9, a-z
# And on the Touch...  Didn't care to test the 1 char invisible stuff, so the order might not be completely accurate...
TOUCH_SORT_INVISIBLE = u' #[:?)\\"{.!/%…;&]},*\'(@'
# And on the PaperWhite... (Yeah, completely different than on the Touch... Oh, joy...)
PW_SORT_INVISIBLE = u' _™…].#*`)"-;@&{^/,%~=|}€>[($+:?!\\<'

# Sort order for all chars (invisible needed in case the collection is 1 char long)
SORT_CHARACTERS = u'- _,;:!?/.`^~\'"()[]{}@$*&#%+<=>|0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ'
# And on the Touch... (Note that you shouldn't be able to put a leading/trailing whitespace in a collection name,
# be it via the default UI or Collections Manager, that's why I put it in the invisible list on the Touch).
TOUCH_SORT_CHARACTERS = u'_-`^+<=>|~$€0123456789 abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ#[:?)\\"{.!/%…;&]},*\'(@'
# NOTE: @ possibly sorted like A   ™ possibly sorted like tm or TM
# PaperWhite... Don't have a lot of choices anymore to put stuff in front... A single quote, and that's it :/.
# The case sorting interacts with the invisible chars in a weird way, some of them sit between lowercase and uppercase if they precede the exact same letter...
PW_SORT_CHARACTERS = u'\'012345789 abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ_™…].#*`)"-;@&{^/,%~=|}€>[($+:?!\\<'

Last edited by NiLuJe; 11-24-2012 at 02:12 PM.
NiLuJe is offline   Reply With Quote