Converting text from Unicode to ASCII

digg this!| | Comments (0) | TrackBacks (0)

Just had to convert some text files from Unicode to ASCII and used Vim to do it:

Open each file and notice that vim says [converted] at the bottom, indicating that it has transparently opened the unicode file to let you edit that file.

On each file, change the file encoding setting to latin1 (basic ASCII):


:set fenc=latin1

Then save the file and it will be converted:


:wq

FYI, The vim docs note that changing the "encoding" setting does not affect existing text so that won't work.

0 TrackBacks

Listed below are links to blogs that reference this entry: Converting text from Unicode to ASCII.

TrackBack URL for this entry: http://juxtaposition.axley.net/blog-bin/mt-tb.cgi/453

Leave a comment

March 2011

Sun Mon Tue Wed Thu Fri Sat
    1 2 3 4 5
6 7 8 9 10 11 12
13 14 15 16 17 18 19
20 21 22 23 24 25 26
27 28 29 30 31    

«« December 2010

Sun Mon Tue Wed Thu Fri Sat
    1 2 3 4 5
6 7 8 9 10 11 12
13 14 15 16 17 18 19
20 21 22 23 24 25 26
27 28 29 30 31    

Archives

Contact: Jason Axley

Search Amazon:

Amazon Logo
Powered by Movable Type 4.1