shabados / presenter

Desktop app for presenting the Shabad OS Database on projectors, TVs, and live streams
https://shabados.com
MIT License
19 stars 15 forks source link

fix(frontend/controller): convert search query to ascii when required #543

Closed bhajneet closed 4 years ago

bhajneet commented 4 years ago

otherwise it will unnecessarily move around sihari accent character (ASCII i)

fix #166


Summary

The search query was unnecessarily being converted to ascii which caused it to move the accent character (sihari). Making sure the query is not ascii before converting it resolved it.

Before

before

After

after

Tests

Tried ascii and unicode on desktop and mobile phone.

Tried all sorts of various characters on keyboard without having the render mess up (and hopefully assuming that applies to query as well, no easy way to test all those manually)

Other

I am unsure if there is a way to refactor such that I don't have to use the same conditional in two separate locations

PM / Time

Took between 30-45 minutes

sarabveer commented 4 years ago

This is wrong, GurbaniAkhar has characters outside of the 128-char ASCII range.

It should be solved in https://github.com/ShabadOS/database/issues/1333

bhajneet commented 4 years ago

Closing in favor of using isGurmukhi gurmukhi utils https://github.com/ShabadOS/gurmukhi-utils/pull/141