<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>jpdemory &#187; Vim</title>
	<atom:link href="http://www.jpdemory.com/blog/tag/vim/feed" rel="self" type="application/rss+xml" />
	<link>http://www.jpdemory.com/blog</link>
	<description>Ressources informatiques</description>
	<lastBuildDate>Fri, 20 Aug 2010 09:49:44 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>vim : convertir l’encodage d’un fichier</title>
		<link>http://www.jpdemory.com/blog/210</link>
		<comments>http://www.jpdemory.com/blog/210#comments</comments>
		<pubDate>Sun, 19 Apr 2009 20:57:10 +0000</pubDate>
		<dc:creator>Jean-Philippe DEMORY</dc:creator>
				<category><![CDATA[Vim]]></category>
		<category><![CDATA[convertir]]></category>

		<guid isPermaLink="false">http://www.jpdemory.com/blog/?p=210</guid>
		<description><![CDATA[Comment convertir un fichier latin1 (iso-8859-1) en utf-8 ou vice-versa ? Convertir pendant l&#8217;&#233;dition :set fileencoding=utf-8 ou :set fenc=latin1 Remarque : l&#8217;option fileencoding peut-&#234;tre abr&#233;g&#233; en fenc Convertir pendant l&#8217;ouverture du fichier :edit ++enc=koi8-r russe.txt Convertir lors de l&#8217;&#233;criture du fichier :write ++enc=utf-8 russe.txt Les types d&#8217;encodage latin1 caract&#232;res 8-bits (ISO-8859-1) iso-8859-N variante ISO-8859 (N [...]


Related posts:<ol><li><a href='http://www.jpdemory.com/blog/204' rel='bookmark' title='Permanent Link: vim : convertir un fichier Windows en fichier Unix'>vim : convertir un fichier Windows en fichier Unix</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>Comment convertir un fichier latin1 (iso-8859-1) en utf-8 ou vice-versa ?</p>
<p><span id="more-210"></span></p>
<h2>Convertir pendant l&rsquo;&eacute;dition</h2>
<pre class="brush: plain; light: true">
:set fileencoding=utf-8</pre>
<p>ou</p>
<pre class="brush: plain; light: true">
:set fenc=latin1</pre>
<p><strong>Remarque</strong> : l&rsquo;option <code>fileencoding</code> peut-&ecirc;tre abr&eacute;g&eacute; en <code>fenc</code></p>
<h2>Convertir pendant l&#8217;ouverture du fichier</h2>
<pre class="brush: plain; light: true">
:edit ++enc=koi8-r russe.txt</pre>
<h2>Convertir lors de l&#8217;&eacute;criture du fichier</h2>
<pre class="brush: plain; light: true">
:write ++enc=utf-8 russe.txt</pre>
<h2>Les types d&#8217;encodage</h2>
<table width="504" cellspacing="0" cellpadding="2" border="1">
<tbody>
<tr>
<td width="117" valign="top">latin1</td>
<td width="385" valign="top">caract&egrave;res 8-bits (ISO-8859-1)</td>
</tr>
<tr>
<td width="117" valign="top">iso-8859-N</td>
<td width="385" valign="top">variante ISO-8859 (N = 2 &agrave; 15)</td>
</tr>
<tr>
<td width="117" valign="top">koi8-r</td>
<td width="385" valign="top">russe</td>
</tr>
<tr>
<td width="117" valign="top">koi8-u</td>
<td width="385" valign="top">ukrainien</td>
</tr>
<tr>
<td width="117" valign="top">8bit-{nom}</td>
<td width="385" valign="top">n&#8217;importe quel encodage 8-bits (nom sp&eacute;cifique de Vim)</td>
</tr>
<tr>
<td width="117" valign="top">cp{nombre}</td>
<td width="385" valign="top">MS-Windows : n&#8217;importe quelle page de codes mono-octet install&eacute;e</td>
</tr>
<tr>
<td width="117" valign="top">cp932</td>
<td width="385" valign="top">japonais (Windows uniquement)</td>
</tr>
<tr>
<td width="117" valign="top">euc-jp</td>
<td width="385" valign="top">japonais (Unix uniquement)</td>
</tr>
<tr>
<td width="117" valign="top">sjis</td>
<td width="385" valign="top">japonais (Unix uniquement)</td>
</tr>
<tr>
<td width="117" valign="top">cp949</td>
<td width="385" valign="top">cor&eacute;en (Unix et Windows)</td>
</tr>
<tr>
<td width="117" valign="top">euc-kr</td>
<td width="385" valign="top">cor&eacute;en (Unix uniquement)</td>
</tr>
<tr>
<td width="117" valign="top">cp936</td>
<td width="385" valign="top">chinois simplifi&eacute; (Windows uniquement)</td>
</tr>
<tr>
<td width="117" valign="top">euc-cn</td>
<td width="385" valign="top">chinois simplifi&eacute; (Unix uniquement)</td>
</tr>
<tr>
<td width="117" valign="top">cp950</td>
<td width="385" valign="top">chinois classique (sur Unix, alias pour big5)</td>
</tr>
<tr>
<td width="117" valign="top">big5</td>
<td width="385" valign="top">chinois classique (sur Windows, alias pour cp950)</td>
</tr>
<tr>
<td width="117" valign="top">euc-tw</td>
<td width="385" valign="top">chinois classique (Unix uniquement)</td>
</tr>
<tr>
<td width="117" valign="top">2byte-{nom}</td>
<td width="385" valign="top">Unix : n&#8217;importe quel encodage sur deux octets (nom sp&eacute;cifique de Vim)</td>
</tr>
<tr>
<td width="117" valign="top">cp{nombre}</td>
<td width="385" valign="top">MS-Windows : n&#8217;importe quelle page de codes sur deux octets install&eacute;e</td>
</tr>
<tr>
<td width="117" valign="top">utf-8</td>
<td width="385" valign="top">Unicode UTF-8 encod&eacute; sur 32 bits (ISO/IEC 10646-1)</td>
</tr>
<tr>
<td width="117" valign="top">ucs-2</td>
<td width="385" valign="top">Unicode UCS-2 encod&eacute; sur 16 bits (ISO/IEC 10646-1)</td>
</tr>
<tr>
<td width="117" valign="top">ucs-2le</td>
<td width="385" valign="top">comme ucs-2, en petit boutiste</td>
</tr>
<tr>
<td width="117" valign="top">utf-16</td>
<td width="385" valign="top">ucs-2 &eacute;tendu avec des mots doubles pour plus de caract&egrave;res</td>
</tr>
<tr>
<td width="117" valign="top">utf-16le</td>
<td width="385" valign="top">comme utf-16, en petit boutiste</td>
</tr>
<tr>
<td width="117" valign="top">ucs-4</td>
<td width="385" valign="top">Unicode UCS-4 encod&eacute; sur 32 bits (ISO/IEC 10646-1)</td>
</tr>
<tr>
<td width="117" valign="top">ucs-4le</td>
<td width="385" valign="top">comme ucs-4, en petit boutiste</td>
</tr>
</tbody>
</table>


<p>Related posts:<ol><li><a href='http://www.jpdemory.com/blog/204' rel='bookmark' title='Permanent Link: vim : convertir un fichier Windows en fichier Unix'>vim : convertir un fichier Windows en fichier Unix</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.jpdemory.com/blog/210/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>vim : convertir un fichier Windows en fichier Unix</title>
		<link>http://www.jpdemory.com/blog/204</link>
		<comments>http://www.jpdemory.com/blog/204#comments</comments>
		<pubDate>Sat, 11 Apr 2009 14:46:15 +0000</pubDate>
		<dc:creator>Jean-Philippe DEMORY</dc:creator>
				<category><![CDATA[Non classé]]></category>
		<category><![CDATA[convertir]]></category>
		<category><![CDATA[unix]]></category>
		<category><![CDATA[vi]]></category>
		<category><![CDATA[Vim]]></category>
		<category><![CDATA[Windows]]></category>

		<guid isPermaLink="false">http://www.jpdemory.com/blog/?p=204</guid>
		<description><![CDATA[Il existe au moins deux possibilités pour convertir un fichier Windows en fichier Unix : Première méthode, on demande à vim de faire le travail : :set fileformat=unix ou :set ff=unix Seconde méthode, on retire tous les caractères &#8216;^M&#8217; à la main : :%s/^M//g Le caractère &#8216;^M&#8217; s&#8217;obtient avec les touches [ctrl-v] et [enter] Related [...]


Related posts:<ol><li><a href='http://www.jpdemory.com/blog/210' rel='bookmark' title='Permanent Link: vim : convertir l’encodage d’un fichier'>vim : convertir l’encodage d’un fichier</a></li>
<li><a href='http://www.jpdemory.com/blog/291' rel='bookmark' title='Permanent Link: Bourne Shell : Réaliser une boucle sans fin'>Bourne Shell : Réaliser une boucle sans fin</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>Il existe au moins deux possibilités pour convertir un fichier Windows en fichier Unix :<br />
<span id="more-204"></span><br />
Première méthode, on demande à vim de faire le travail :<br />
<code>:set fileformat=unix</code> ou <code>:set ff=unix</code></p>
<p>Seconde méthode, on retire tous les caractères &#8216;^M&#8217; à la main :<br />
<code>:%s/^M//g</code><br />
Le caractère &#8216;^M&#8217; s&#8217;obtient avec les touches [ctrl-v] et [enter]</p>


<p>Related posts:<ol><li><a href='http://www.jpdemory.com/blog/210' rel='bookmark' title='Permanent Link: vim : convertir l’encodage d’un fichier'>vim : convertir l’encodage d’un fichier</a></li>
<li><a href='http://www.jpdemory.com/blog/291' rel='bookmark' title='Permanent Link: Bourne Shell : Réaliser une boucle sans fin'>Bourne Shell : Réaliser une boucle sans fin</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.jpdemory.com/blog/204/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
