0

I am working on a Sanskrit MySql database that has special characters in the data like below: Mahāvākyavivaraṇa.

But user can only enter Mahavakyavivarana using a standard keyboard.

How may I perform a sql search with something like this:

SELECT manuscripts.* FROM manuscripts WHERE (Title = 'Mahavakyavivaraṇa')

and get output for

SELECT manuscripts.* FROM manuscripts WHERE (Title = 'Mahāvākyavivaraṇa')

I am using Ruby On Rails as programming language.

Deepak Mahakale
  • 22,834
  • 10
  • 68
  • 88
Pawan
  • 99
  • 1
  • 13

1 Answers1

2

If you set an appropriate collation for the column then the value within the field will compare equal to its unaccented equivalent naturally.

See here: https://stackoverflow.com/a/4813651/334314

eikes
  • 4,811
  • 2
  • 31
  • 31
  • How well do you think this is going to work for Sanskrit? My guess is not very and a transliteration library like stringex is probably a better bet. – max Nov 02 '20 at 20:55
  • @max - Generally it works with latin (A-Z) based characters. If you have an example in Sanskrit, start a new Question and I will probably look into it. – Rick James Nov 02 '20 at 22:59