4 ms·
I wonder if a screen reader could be smart enough to use OCR when it comes across an abrupt sequence of unusual character combinations like this.
by tikwidd 6y ago
I wonder if a screen reader could be smart enough to use OCR when it comes across an abrupt sequence of unusual character combinations like this.
- function_seven 6y agoI don't think you'd need to use OCR for that. Just* use transliteration tables to map those characters to the base characters. (* I usually hate when 'just' is used this way, I'm sure it's a minefield in some respects. But still more robust than trying to optically interperet what amounts to captchas in some situations :)
- _-___________-_ 6y agoThere are quite a few libraries for converting arbitrary Unicode to some subset while preserving as much meaning as possible (presumably by embedding such tables), and they generally work pretty well on this kind of text.
- function_seven 6y agoYeah, I've used iconv('UTF-8', 'ASCII//TRANSLIT', $text) in my work to make sure I could accept arbitrary Unicode from users, and also send that same info as ASCII to legacy systems that mangled UTF. It worked really well. When I wrote the parent comment, I tried it real quick with a REPL on my own machine, but apparently I don't have the right combination of environment variables or locales or God knows what. Didn't feel like chasing that rabbit into his hole.