Wednesday, August 29, 2012

Re: ASCIIfication (removal of accent, cedilla, etc)

To reply to my own post, check out vim.wikia.com/wiki/Remove_diacritical_signs_from_characters 

Salman

CDIV Fyle nae founde. 

On 29, اگست 2012, at 22:46, Salman Halim <salmanhalim@gmail.com> wrote:

On 29, اگست 2012, at 22:36, Tim Chase <vim@tim.thechases.com> wrote:

I've got some Portuguese text that I need to perform some
transformations on to make them ASCII (7-bit).  That means removing
accent marks, cedillas, tildes, etc.

Is there some fast transform in Vim that I've missed, or an easy way
to go about this?

Thanks,

-tim

I don't believe there is something that will figure out the non-accented version of a given character, but you could do something similar using tr() by passing in "èéêëē" and "eeeee", for example.

Tedious, yes, but only needs to be done a few times and shouldn't be a very painful function that takes a range of lines and does this over them.

Hope this helps,

Salman

No comments:

Post a Comment