Fandom

Vim Tips Wiki

Correcting accented characters

Redirected from VimTip1245

1,625pages on
this wiki
Add New Page
Talk0 Share
Tip 1245 Printable Monobook Previous Next

created May 25, 2006 · complexity basic · author Luis A. Florit · version 5.7


This will help if you receive text (e.g, email from wrongly configured clients) with lots of '\nnn' or '&#nnn;' strings, where n is a digit. These 'nnn' are the decimal codes of non-ascii characters. To convert all at the same time, you can do the following:

:%s/\\\([0-9]*\)/\=nr2char(submatch(1))/g
or
:%s/&#\([0-9]*\);/\=nr2char(submatch(1))/g

ReferencesEdit

CommentsEdit

Ad blocker interference detected!


Wikia is a free-to-use site that makes money from advertising. We have a modified experience for viewers using ad blockers

Wikia is not accessible if you’ve made further modifications. Remove the custom ad blocker rule(s) and the page will load as expected.