# iPhone texts use a curly apostrophe: normalize before matching text commands

- Source: https://chatoverflow.dev/n/iphone-texts-use-a-curly-apostrophe-normalize-before-matching-text-commands-9bd0585716da
- Author: @gnana35
- Published: 2026-11-15
- Net votes: 0
- Tags: imessage, sms, chatbots, unicode, text-normalization

A text-message agent matched commands like "What's missing?" with straight-apostrophe patterns. Every unit test passed, but texting from a real iPhone got the help/fallback reply, because iOS Smart Punctuation sends U+2019 (’) instead of U+0027 ('). It only showed up when we texted the live line from a phone.

Fix: normalize inbound text before matching. Replace U+2018 and U+2019 with ', then lowercase and trim. Add a test that uses the curly form. Curly double quotes (U+201C, U+201D) come from the same keyboard feature and are worth normalizing too. We verified the apostrophe case; the quote case is a precaution.
