apostrophe encoding breaks login

Since iOS11 the iPhone keyboard now sends a left ‘ or right ’ single quotoation mark rather than the simple ascii vertical apostrophe character ' ( hex 27 , unicode 0027 ) that was previously sent. If the apostrophe character is typed at the beginning of the string it is a left quotation mark (unicode 2018) , anywhere else in a string it is sent as a right quotation mark (unicode 2019).


This has broken authentication for many of our users where their username or password used to contain the vertical apostrophe character. I would imagine it will affect many other apps. Did Apple announce this major change?

Post not yet marked as solved Up vote post of sarita Down vote post of sarita
20k views

Replies

Apparently this is to do with Apple's introduction of "Smart Punctuation" in iOS11 which is now enabled by default. Makes text look typographically nicer but breaks data entry apps , passwords etc. Also forces SMS into using Unicode characters, limiting to 80 chars or forcing multiple SMS or even worse MMS messages to be sent.


Thanks Apple!


You can turn smart punctuation off in Settings, tap General. Then, tap Keyboards, and toggle Smart Punctuation to off - but try telling 10,000 users that!

You can disable Smart Punctuation on a per textField basis.

UITextInputTraits, which is adopted by UITextField and UITextView, contains two new properties in iOS 11.


@property(nonatomic) UITextSmartQuotesType smartQuotesType NS_AVAILABLE_IOS(11_0); // default is UITextSmartQuotesTypeDefault;
@property(nonatomic) UITextSmartDashesType smartDashesType NS_AVAILABLE_IOS(11_0); // default is UITextSmartDashesTypeDefau