I have a file that has so many persian/arabic digits in it. I would like to replace them with their English counterparts. How is that possible?
1 Answer
Use the following :s
command for Persian and Urdu digits:
:%s/\([۰-۹]\)/\=char2nr(submatch(1))-1776/g
And the following for Arabic digits:
:%s/\([۰-۹]\)/\=char2nr(submatch(1))-1536/g