LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices

Reply
 
Search this Thread
Old 05-14-2008, 10:13 AM   #1
xpucto
Member
 
Registered: Sep 2005
Location: Vienna, Austria
Distribution: Mint 13
Posts: 522

Rep: Reputation: 31
How to switch the encoding in vim from ISO-latin1( 8859-1) to UTF-8 and reciprocally?


Hi!

when compiling my latex files I have trouble because some of my computers still work under latin1 (Suse 9) and the more recent installations (opensuse 10 and FC8) work under UTF-8. I use vim as editor.

I would like to know how I may the encoding system in vim.

thanks.

Last edited by xpucto; 05-14-2008 at 10:28 AM.
 
Old 05-14-2008, 11:42 AM   #2
berbae
Member
 
Registered: Jul 2005
Location: France
Distribution: Arch Linux
Posts: 540

Rep: Reputation: Disabled
There is the 'iconv' command to convert the encoding of characters in files.
Look at the manual for that command:
iconv -cs -f UTF-8 -t ISO-8859-1 file > newfile
iconv -cs -f ISO-8859-1 -t UTF-8 file > newfile
 
Old 05-17-2008, 02:35 PM   #3
xpucto
Member
 
Registered: Sep 2005
Location: Vienna, Austria
Distribution: Mint 13
Posts: 522

Original Poster
Rep: Reputation: 31
Quote:
Originally Posted by berbae View Post
There is the 'iconv' command to convert the encoding of characters in files.
Look at the manual for that command:
iconv -cs -f UTF-8 -t ISO-8859-1 file > newfile
iconv -cs -f ISO-8859-1 -t UTF-8 file > newfile
I don't want only to convert some specific files, I want to be abble to change the default encoding of vim. How may I do this?
 
Old 05-17-2008, 04:50 PM   #4
berbae
Member
 
Registered: Jul 2005
Location: France
Distribution: Arch Linux
Posts: 540

Rep: Reputation: Disabled
After a search at the Vim site, I found that answers page
It contains what you are looking for.
I didn't know the ':e ++enc=' command which permits to change the encoding of a file.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
convert text-file from utf-8 to iso-8859-1 [SOLVED] @ngelot Linux - Server 1 06-12-2007 05:47 AM
im getting UTF-8 to STRING: Could not open converter from 'UTF-8' to 'ISO-8859-1' jabka Linux - Newbie 2 11-24-2006 05:44 AM
Suse and ISO-8859-15 charset badbunny Linux - Newbie 2 10-21-2005 03:44 AM
Problem with UTF-8 and ISO-8859-1 dasenjo Linux - Software 0 06-22-2003 12:14 AM
iso 8859 or iso 9960 tsundram Linux - Newbie 16 02-22-2002 10:32 PM


All times are GMT -5. The time now is 10:18 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration