Unicode and writing guides

Check a palindrome with accents, punctuation and mixed case

·

A palindrome reads the same in either direction under a stated comparison rule. For a phrase, that rule often skips punctuation and whitespace and compares lowercase text. Check the compared graphemes to see which settings affect the result.

Palindrome Checker

Check a phrase with and without punctuation

Choose Load example and Check palindrome. The phrase A man, a plan, a canal: Panama! becomes amanaplanacanalpanama with the default settings. The result is Palindrome.

Clear Ignore spaces and punctuation, then check again. The result shows the first differing pair at positions 1 and 31. The opening a is compared with the final exclamation mark. The positions refer to the compared graphemes shown by the tool.

Unicode Standard Annex #29, Text Segmentation

Compare two spellings of an accented character

Paste Éxé. The first character is a composed capital É. The last is a lowercase e followed by a combining acute accent. Use NFC and Compare lowercase graphemes to compare three graphemes and get Palindrome.

Choose Source form and check again. The first and last graphemes have different sequences and the checker reports a mismatch. Inspect those sequences in Unicode Code Point Viewer to verify the composition.

Compare two spellings of an accented character
ComparisonExpected result for Éxé
NFC, lowercase comparisonPalindrome
Source form, lowercase comparisonDifferent graphemes
NFC, preserve caseDifferent graphemes

Unicode Standard Annex #15, Normalization FormsUnicode Standard Annex #29, Text Segmentation

Choose the intended language for lowercase matching

Paste Iı with an uppercase I followed by a dotless ı. With Compare lowercase graphemes enabled, select English and check to see i and ı differ. Select Turkish and check again to compare ı with ı.

Lowercasing applies to each grapheme independently. The JSON report records the selected language and comparison settings. Arabic and Hebrew text is examined in logical source order, while the browser handles visual direction.

ECMAScript Internationalization API, Locale-sensitive lowercasingUnicode Standard Annex #9, Bidirectional Algorithm

Common questions

What happens when I enter only spaces and punctuation?

With Ignore spaces and punctuation enabled, the result is No comparable graphemes. Include those characters when they are part of the intended comparison.

Does a joined emoji reverse one code point at a time?

The checker compares whole graphemes. A joined emoji can remain one unit even when its encoding contains several code points.

Do the mismatch positions refer to input bytes?

They are one-based positions in the compared grapheme sequence after applying the selected settings.

Sources

Put it into practice.

Related guides