Finding smart punctuation in text that must be ASCII
A curly apostrophe looks like ordinary punctuation and sits outside ASCII. When an ASCII-only field rejects a pasted sentence, inspecting the code points shows which character is responsible.
Why a pasted sentence is rejected
ASCII defines 128 characters, numbered 0 to 127: unaccented letters, digits, basic punctuation and control codes. Word processors, phone keyboards and many web editors replace the typewriter-style apostrophe and quotation marks with curly versions as you type. The curly versions look nearly the same, but they are different characters and are not part of ASCII. A field that accepts only ASCII will therefore reject a sentence containing one, and the error message may not say which character is at fault. In a long paragraph the culprit can be a single apostrophe in a contraction, easy to miss by eye.
What the ASCII tool does with ’
The first case encodes the character ’ with the ASCII converter. The tool does not replace it with a straight apostrophe or drop it. It reports that ASCII supports only code points up to 127 and stops. That behavior is deliberate. Silent replacement would change the text without telling you, and a field that depends on exact characters, such as a password, a key or a signed message, could then fail later for a reason that is hard to trace. The rejection makes the problem visible at the point where it occurs.
Finding the code point
The second case runs the same character through the Unicode converter and gets U+2019. That is RIGHT SINGLE QUOTATION MARK, the curly apostrophe. In UTF-8 it takes three bytes, E2 80 99. Knowing the code point settles the question of which character is present and lets you search the text for it. The left counterpart, U+2018, opens a quotation, and the double quotation marks are U+201C and U+201D. Other offenders in pasted text include the en dash U+2013, the em dash U+2014 and the horizontal ellipsis U+2026, none of which are ASCII.
The straight apostrophe control
The third case encodes the typewriter apostrophe, which is the character U+0027, and the ASCII converter returns the code 39. This is the character the field expects. In the ASCII table, 39 is the apostrophe, 34 is the straight double quotation mark and 45 is the hyphen-minus. A visual comparison between the straight and curly forms is unreliable because fonts differ, so the code is the dependable evidence. Setting the two results side by side, 39 against an error, shows the whole problem in one view. ASCII itself is specified as a 7-bit code in the American standard X3.4, and the international ISO 646 family is built on it. Every ASCII character fits in one byte whose top bit is zero, which is why a byte above 127 is a quick sign that the text is not plain ASCII at all.
Replacing characters is an editing decision
Changing ’ to ' alters the source text. For casual input this is harmless, and many forms do it automatically. For other uses it matters: a legal name that contains an apostrophe, a quoted line of an author or a code string may need exactly the character that was typed. If a receiving system truly requires ASCII, record which replacements you made and check the specification of the receiving format. Some systems offer an escape syntax, such as \u2019 in JSON or ’ in HTML, which keeps the character and still uses only ASCII bytes. Which choice is right depends on the format that receives the text. When you cannot tell, ask whoever owns the receiving system, and keep the original beside the converted version so that the change can be reversed.
Accented letters are a different problem
The converter does not transliterate. A letter such as é, which is U+00E9, is also outside ASCII, and so are ñ, ü and ø. Turning them into e, n, u and o is a lossy change, and the correct substitution varies by language. German conventions write ü as ue in some contexts, and Scandinavian practice treats ø differently. This guide uses punctuation, but the same code-point check works for letters. If a name has to fit in an ASCII field, ask the receiving system what it expects instead of guessing a spelling.
Where the curly marks come from
Typographic quotation marks are not a mistake. They are the correct printing convention in English, and word processors insert them on purpose. Windows-1252, the older Microsoft character set, assigned the byte 0x92 to ’, which is why files from older systems sometimes show strange characters when decoded under a different assumption. Unicode gave these marks stable code points that work across systems. The tension arises only when text prepared for human readers is sent into a channel built for the 128-character ASCII set, such as an old protocol, a fixed-width record or a command line.
Other characters that trigger the same rejection
The curly apostrophe is the most common case, and it has company. The en dash U+2013, the em dash U+2014, the horizontal ellipsis U+2026 and the non-breaking space U+00A0 all come from word processors and web pages and all fall outside ASCII. The non-breaking space is the hardest to find because it looks like an ordinary space. A bullet U+2022 and a trademark sign U+2122 behave the same way. The ASCII converter rejects each at its first occurrence, so after you fix one it can reveal the next. Searching a text for characters above U+007F finds them all in one pass. Many code editors can highlight non-ASCII characters, and a regular expression for the range 0 to 127 in a command-line tool can list the lines that need attention. A text editor setting that shows invisible characters will reveal a non-breaking space, which otherwise passes every visual check. After the last replacement, rerun the whole text through the ASCII converter to confirm that nothing remains.
Using the controls on a real sentence
To find the offending character in your own text, paste short pieces into the Unicode converter and look for code points above U+007F. Splitting the sentence in half repeatedly finds the problem quickly. Once found, decide whether to change the text, escape the character or choose a different field. Keep a copy of the original wording. For a short string such as a product name or an address line, a manual check of each unusual mark is quick; for a long document, a script is safer than reading, because the human eye does not separate U+2019 from U+0027. After any change, run the new text through the ASCII converter and confirm that every character now has a code from 0 to 127, which proves it fits the ASCII requirement.
Reproduce the checks
Curly apostrophe
Open the Ascii Converter and enter:
- Calculation mode
encode- Text or encoded input
’
Expected rejection:
ASCII supports onlyThis character falls outside the supported ASCII range.
Inspect its code point
Open the Unicode Converter and enter:
- Calculation mode
encode- Text or encoded input
’
Expected output:
Code points
U+2019The inspection reveals the actual character.
Straight apostrophe control
Open the Ascii Converter and enter:
- Calculation mode
encode- Text or encoded input
'
Expected output:
Codes
39A replacement would be a deliberate content edit.
References and implementation scope
The examples describe the behavior of the linked Computandum tools. A successful local check does not establish that another application accepts the same format or applies the same limits.
Sources
- Primary definition and convention reference ↗ · 2026-10-08