Consider the following: steveg@speedy:~/jbox$ python Python 2.2.3 (#1, Jun 4 2003, 02:54:59) [GCC 3.3 (Debian)] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> "I've fallen and i can't get up".title() "I'Ve Fallen And I Can'T Get Up" >>> That looks fairly non-standard to me. Apparently, the title() method treats apostrophes as whitespace/word seperators/something. Thanks, Steve
Logged In: YES user_id=21627 Unfortunately, this usage of the apostrophe is specific to the English language. Martin says, 'if the apostrophe is used for indirect speech, upper-casing after it is correct'.
Logged In: YES user_id=593130 If the ' directly follows a letter, then it is being used for a contraction and not for indirect speech, and the following letter should not be uppercased.
Logged In: YES user_id=80475 The determination of what actually constitutes a word is language-dependent. For instance, in French, l'arbre is considered two words. See: http://www.unicode.org/reports/tr21/tr21-5d3.html Also, I tried the VB and MS-Excel implementations (they call it "proper" instead of "title") and they match the current Python behavior. I found no equivalent string method in Java.
Logged In: YES user_id=21627 Thanks, Raymond, for this investigation. Closing it as wont-fix - if you want an algorithm that follows the English language rules, you have to implement that yourself.