• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • Ron McLeod
  • Devaka Cooray
  • Paul Clapham
Sheriffs:
  • paul wheaton
Saloon Keepers:
  • Tim Holloway
Bartenders:

Silly Sunday question

 
Bartender
Posts: 10780
71
Hibernate Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I was looking through the "ignore case" comparisons for String recently, and discovered that unless it's a full Unicode check (ie, including surrogate pairs) they all check upper case first, then lower, only if the uppercase values are equal.

Anyone care to guess why that might be the case? I presume they had their reasons.

Winston
 
Rancher
Posts: 43081
77
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Possibly because of the quirkiness of some locales wrt. uppercase and lowercase: http://java.sys-con.com/node/46241
 
Winston Gutkowski
Bartender
Posts: 10780
71
Hibernate Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Ulf Dittmer wrote:Possibly because of the quirkiness of some locales wrt. uppercase and lowercase: http://java.sys-con.com/node/46241


Ah. That might be it. There was a mention in the code about Turkish, but no explanation as to why (or any link).

Cheers for that.

Winston
 
Did you miss me? Did you miss this tiny ad?
The new gardening playing cards kickstarter is now live!
https://www.kickstarter.com/projects/paulwheaton/garden-cards
reply
    Bookmark Topic Watch Topic
  • New Topic