Tips: Turn off iOS 11 Smart Punctuation to avoid data entry problems

in iPhone
An unexpected side effect of Apple's new Smart Punctuation feature in iOS 11 has manifested and is causing some problems with apps that use Core Data to store strings. Here's how to turn off Smart Punctuation, and why you might want to for now.

en- and em-dashes, example from
en- and em-dashes, example from

First spotted by SongSheet app developer Gabriel Hauber, Smart Punctuation is periodically inserting a null byte. Specifically, if the user enters two dashes, it generates an en-dash. If the user enters three, then the en-dash is displayed, but a null-byte is appended after the en-dash.

The null byte insertion prematurely ends a string, which as a best case causes a truncation of data -- but can also lead to instability and crashing.

In all likelihood, Apple is already working on a fix, and given a brief perusal of developer documentations, it appears to be able to be temporarily disabled by app developers. However, to fix the problem on your personal devices and sidestep the issue for now in its entirety, here's how to turn off the feature.

In Settings, tap General. Then, tap Keyboards, and toggle Smart Punctuation to off.


  • Reply 1 of 8
    mike1mike1 Posts: 1,939member
    I understand the problems this may cause some people until it is resolved, but really like the ability to easily add an en-dash while typing.
  • Reply 2 of 8
    I would love to see more details about what's really going on here.  In iOS, user input comes in the form of an NSString object (or a String object in Swift).  These string objects are fully UNICODE enabled, include length counters, and do not use NULL bytes as terminators.

    If an application is grabbing the raw data and treating it as a C-style string, whether for internal use or for use with an external framework, then problems like this are likely to occur, because the byte-stream can include zero values.

    On the other hand, if the application is doing the right thing, and calling appropriate member functions to get (for example) a UTF-8 representation of the UNICODE string, then there shouldn't be any zeros in the resulting byte stream.  If there are, then Apple's got a bug somewhere, which will clearly need to be fixed.

  • Reply 3 of 8
    The problem with workarounds like this - asking folks to disable the setting for now - is that people often don't remember to go back and re-enable it after Apple quietly fixes the issue in the next update. Heck, they likely won't know that Apple fixed it - since Apple doesn't detail every fix that goes into an update.
  • Reply 4 of 8
    So, the error seems to be on Apple's side. I guess that the third tap should turn the en-dash into an em-dash. Is that correct? Also, your image caption, should state "hyphens, en-, and em-dashes, example from"
    edited September 2017 teaearlegreyhot
  • Reply 5 of 8
    john.bjohn.b Posts: 2,722member
    I just wanted to say, as an erstwhile C programmer, C-style strings (null terminated character arrays) need to DIAF. They have been the source of so many bugs over the decades. I’d bet money that’s what SongSheet is experiencing.
  • Reply 6 of 8
    My current issue with the iOS spellchecker is the random capitalization of words that should obviously not be capitalized. Drives me nuts and is a real time waster.
  • Reply 7 of 8
    MarvinMarvin Posts: 14,230moderator
    My current issue with the iOS spellchecker is the random capitalization of words that should obviously not be capitalized. Drives me nuts and is a real time waster.
    These can be turned off in Settings > General > Keyboards. Auto-capitalisation is one of the options. That disables it entirely though.

    I think it would be easier if smart replacements could be enabled/disabled from the keyboard itself like caps lock. Most of the time, I prefer them disabled but it would be nice to be able to write ^ and have what follows turn into superscript when it was needed.

    It would be useful to have smart replacement profiles so that they could be changed based on context. If you are writing a standard document, you may want markdown support. If you insert an equation, you may want LaTex so you would just switch them on the keyboard when typing an equation and switch back when you go back to the standard text. It can allow for where capitalisation happens using regular expressions e.g only for words preceded by end of sentence or new paragraph, not by space.

    The profiles would just be lists of substitutions, allowed contexts and commands. Some could be action shortcuts in rich editors like Pages e.g typing \b could enable bold and typing again could disable it, the characters would disappear after typing. Disabling the substitution from the keyboard would leave it as text.

    Users would be able to post substitution profiles online. People who are used to typing fast like stenographers can have profiles with common abbreviations, maybe symbols drawn with the Apple Pencil.
  • Reply 8 of 8
    Appleinsider wrote:
    "Specifically, if the user enters two dashes, it generates…"

    I believe this should have read:
    Specifically, if the user enters two hyphens, it generates…"

    In general, spell-check, auto-caps and autoreplace are huge nuisances to me.  And the bug revealed in this report is further demonstration of why they should be eliminated.
Sign In or Register to comment.