Codepoints / Codepoints.net

A visual guide to the wonders of Unicode
https://codepoints.net
81 stars 11 forks source link

Add a warning on the Analyze functionality when using Safari browser #133

Open Pigeo opened 4 weeks ago

Pigeo commented 4 weeks ago

Description of the problem:

Safari browser on a mac (at least Safari 17.6 running on macOS Monterey 12.7.6) automatically / silently normalizes any string to NFC when copy/pasting into the input text box of Codepoints' Analyze, thus rendering it unusable + confusing the user about whether this functionality is bugging or working correctly.

IMPORTANT: Please note that Safari browser on iPhone doesn't have this problem (at least on my iPhone 8 running iOS 16.7.10, it's NOT normalizing to NFC when copy/pasting)

Suggestion of fix:

When the user agent is Safari on a mac, add a warning text in red to inform the user about this problem and suggest him to use another browser.

Notes:

I've tested Safari on iPhone, Firefox on Mac, Chrome on Mac, Firefox on Windows, Chrome on Windows, Edge: no other browser than Safari on a Mac show this particular problem.

Boldewyn commented 3 weeks ago

Oh, good catch! Thank you very much for the report!

I’ll try to find some piece of official documentation for that behaviour and will then notify users in the way you suggested.

Boldewyn commented 3 weeks ago

Interestingly, it seems I had this problem already some time in the past. I upvoted a 2012 StackOverflow question on this topic. One of the answers also provides a possibility to maybe work around this issue:

https://stackoverflow.com/a/32615840/113195