I have text in my database. I send some text from xhr to my view. Function find does not find some unicode chars.
I want to find selected text using:
text.find(selection)
but sometimes variable 'selection' contains a char like that:
? # in xhr unichr(281)
whereas in variable 'text' there was:
e? # in db has two chars unichr(101) + unichr(808)
They are just different forms of the same thing. How to make .find
work more reliably here?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…