I am trying to grab the position of the cursor and I wrote the following code for that. The code works well, but the problem is that it only works well for English text, and in