When I convert text to title case that contains a proper curly apostrophe character, the title case action capitalizes the letter that comes after it. For instance:
I don’t want to go > I Don’t Want to Go [with straight apostrophe]
I don’t want to go > I Don’T Want to Go [with curly apostrophe]
For a locale-sensitive alternative, if you bind a KM variable with a name like itcHeadline to the string, (for example from the clipboard), you can use this:
or in AppleScript (through which access to the Foundation classes is unfortunately more circuitous)
use framework "Foundation"
use scripting additions
tell application "Keyboard Maestro Engine"
set strText to getvariable ("itcHeadline")
end tell
((current application's NSString's stringWithString:(strText))'s ¬
capitalizedStringWithLocale_(¬
(current application's NSLocale's currentLocale()))) as text
Just uploaded the third revision of Improved Title Case, which handles some obscure things like hashtags and @ words properly (by leaving them alone this time).
But I’ve also separately included commented code to explain what’s going on in the Perl code. As I understand it the first incarnation of this code by John Gruber is the basis for the title case action in Keyboard Maestro. So this is the same game with a few extensions.