<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<atom:link href="http://forum.ubuntu-fr.org/extern.php?action=feed&amp;tid=1105421&amp;type=rss" rel="self" type="application/rss+xml" />
		<title><![CDATA[Forum Ubuntu-fr.org / Iconv UTF-8 sans bom]]></title>
		<link>http://forum.ubuntu-fr.org/viewtopic.php?id=1105421</link>
		<description><![CDATA[Les sujets les plus récents dans Iconv UTF-8 sans bom.]]></description>
		<lastBuildDate>Thu, 15 Nov 2012 12:53:42 +0000</lastBuildDate>
		<generator>FluxBB</generator>
		<item>
			<title><![CDATA[Réponse à&#160;:  Iconv UTF-8 sans bom]]></title>
			<link>http://forum.ubuntu-fr.org/viewtopic.php?pid=11519281#p11519281</link>
			<description><![CDATA[<p>Dans la boucle, après avoir calculé <strong>FROM</strong> pour le fichier, tu peux sauter le traitement si l&#039;encodage ne convient pas :</p><div class="codebox"><pre><code>[[ ( $FROM != &quot;ISO-8859-1&quot; ) &amp;&amp; ( $FROM != &quot;US-ASCII&quot; ) ]] &amp;&amp; continue</code></pre></div>]]></description>
			<author><![CDATA[dummy@example.com (pingouinux)]]></author>
			<pubDate>Thu, 15 Nov 2012 12:53:42 +0000</pubDate>
			<guid>http://forum.ubuntu-fr.org/viewtopic.php?pid=11519281#p11519281</guid>
		</item>
		<item>
			<title><![CDATA[Réponse à&#160;:  Iconv UTF-8 sans bom]]></title>
			<link>http://forum.ubuntu-fr.org/viewtopic.php?pid=11518761#p11518761</link>
			<description><![CDATA[<p>Super, sauf qu&#039;il chope un :</p><div class="codebox"><pre><code>SyncSource.java:                        text/plain; charset=unknown-8bit
SyncUser.java:                          text/plain; charset=iso-8859-1
Task.java:                              text/plain; charset=unknown-8bit
UserAlreadySynchronizingException.java: text/plain; charset=iso-8859-1</code></pre></div><p>et pour le unknown-8bit il plante et me file de fichier ... grrr</p>]]></description>
			<author><![CDATA[dummy@example.com (adryen31)]]></author>
			<pubDate>Thu, 15 Nov 2012 11:55:41 +0000</pubDate>
			<guid>http://forum.ubuntu-fr.org/viewtopic.php?pid=11518761#p11518761</guid>
		</item>
		<item>
			<title><![CDATA[Réponse à&#160;:  Iconv UTF-8 sans bom]]></title>
			<link>http://forum.ubuntu-fr.org/viewtopic.php?pid=11518281#p11518281</link>
			<description><![CDATA[<p>Tu peux éventuellement récupérer le codage du fichier dans la boucle :</p><div class="codebox"><pre><code>FROM=$(file -bi &quot;$fn&quot; | sed &#039;s/^.*=//&#039;)
FROM=&quot;${FROM^^}&quot;   # Pour tout mettre en majuscules</code></pre></div>]]></description>
			<author><![CDATA[dummy@example.com (pingouinux)]]></author>
			<pubDate>Thu, 15 Nov 2012 10:52:44 +0000</pubDate>
			<guid>http://forum.ubuntu-fr.org/viewtopic.php?pid=11518281#p11518281</guid>
		</item>
		<item>
			<title><![CDATA[Réponse à&#160;:  Iconv UTF-8 sans bom]]></title>
			<link>http://forum.ubuntu-fr.org/viewtopic.php?pid=11518091#p11518091</link>
			<description><![CDATA[<p>mince il y a pas moyen de lui faire prendre les 2 ... car j&#039;ai du us-ascii en plus</p>]]></description>
			<author><![CDATA[dummy@example.com (adryen31)]]></author>
			<pubDate>Thu, 15 Nov 2012 10:30:54 +0000</pubDate>
			<guid>http://forum.ubuntu-fr.org/viewtopic.php?pid=11518091#p11518091</guid>
		</item>
		<item>
			<title><![CDATA[Réponse à&#160;:  Iconv UTF-8 sans bom]]></title>
			<link>http://forum.ubuntu-fr.org/viewtopic.php?pid=11517841#p11517841</link>
			<description><![CDATA[<p>Pour avoir la liste des codages de caractères :</p><div class="codebox"><pre><code>iconv -l</code></pre></div><p>Il semblerait que ce ne soit pas <strong>iso-8859-1</strong>, mais <strong>ISO-8859-1</strong>.<br />Sinon, je peux tester sur un de tes fichiers, s&#039;il est petit et non confidentiel.</p>]]></description>
			<author><![CDATA[dummy@example.com (pingouinux)]]></author>
			<pubDate>Thu, 15 Nov 2012 10:07:18 +0000</pubDate>
			<guid>http://forum.ubuntu-fr.org/viewtopic.php?pid=11517841#p11517841</guid>
		</item>
		<item>
			<title><![CDATA[Réponse à&#160;:  Iconv UTF-8 sans bom]]></title>
			<link>http://forum.ubuntu-fr.org/viewtopic.php?pid=11517671#p11517671</link>
			<description><![CDATA[<p>arf non mes fichier sont converti en :</p><p>$ file -i *</p><div class="codebox"><pre><code>AddWorkflowToSessionAction.java:          text/plain; charset=us-ascii
GenerateWorkflowGraphAction.java:         text/plain; charset=us-ascii
GetWorkflowGraphAction.java:              text/plain; charset=us-ascii
GetWorkflowInitializerDataAction.java:    text/plain; charset=us-ascii
GetWorkflowListOfExtFobFieldsAction.java: text/plain; charset=us-ascii
GetWorkflowListOfStatusAction.java:       text/plain; charset=us-ascii
GetWorkflowStatusAction.java:             text/plain; charset=us-ascii</code></pre></div><p><img src="http://forum.ubuntu-fr.org/img/smilies/sad.png" width="15" height="15" alt="sad" /> même pas utf-8</p>]]></description>
			<author><![CDATA[dummy@example.com (adryen31)]]></author>
			<pubDate>Thu, 15 Nov 2012 09:57:43 +0000</pubDate>
			<guid>http://forum.ubuntu-fr.org/viewtopic.php?pid=11517671#p11517671</guid>
		</item>
		<item>
			<title><![CDATA[Réponse à&#160;:  Iconv UTF-8 sans bom]]></title>
			<link>http://forum.ubuntu-fr.org/viewtopic.php?pid=11517611#p11517611</link>
			<description><![CDATA[<p>Si autant pour moi je n&#039;avais pas recompilé avec dos2unix</p><p>Merci beaucoup <img src="http://forum.ubuntu-fr.org/img/smilies/smile.png" width="15" height="15" alt="smile" /></p>]]></description>
			<author><![CDATA[dummy@example.com (adryen31)]]></author>
			<pubDate>Thu, 15 Nov 2012 09:52:11 +0000</pubDate>
			<guid>http://forum.ubuntu-fr.org/viewtopic.php?pid=11517611#p11517611</guid>
		</item>
		<item>
			<title><![CDATA[Réponse à&#160;:  Iconv UTF-8 sans bom]]></title>
			<link>http://forum.ubuntu-fr.org/viewtopic.php?pid=11517561#p11517561</link>
			<description><![CDATA[<p>arf mince j&#039;ai essayé avec le rm mais cela ne fonctionne pas de supprimer le .bak</p><div class="codebox"><pre><code>#!/bin/bash
FROM=iso-8859-1
TO=UTF-8
ICONV=&quot;iconv -f $FROM -t $TO&quot;
# Convert
find Nouveau -type f | while read fn;
do
   $ICONV &quot;$fn&quot; &gt; &quot;$fn&quot;.bak
   awk &#039;{if(NR==1)sub(/^\xef\xbb\xbf/,&quot;&quot;);print}&#039; &quot;$fn&quot;.bak &gt; &quot;$fn&quot;
   rm &quot;$fn&quot;.bak
done</code></pre></div>]]></description>
			<author><![CDATA[dummy@example.com (adryen31)]]></author>
			<pubDate>Thu, 15 Nov 2012 09:49:55 +0000</pubDate>
			<guid>http://forum.ubuntu-fr.org/viewtopic.php?pid=11517561#p11517561</guid>
		</item>
		<item>
			<title><![CDATA[Réponse à&#160;:  Iconv UTF-8 sans bom]]></title>
			<link>http://forum.ubuntu-fr.org/viewtopic.php?pid=11517461#p11517461</link>
			<description><![CDATA[<p>ok j&#039;ai trouvé :</p><p>his is a common error and the reason is your are using Windows to create the file. Thus the line break is \r\n rather than \n.</p><p>All you need to do is change the format using a system command:</p><p>dos2unix filename_here</p><p>^^ je regarde du coup le resultat</p>]]></description>
			<author><![CDATA[dummy@example.com (adryen31)]]></author>
			<pubDate>Thu, 15 Nov 2012 09:37:03 +0000</pubDate>
			<guid>http://forum.ubuntu-fr.org/viewtopic.php?pid=11517461#p11517461</guid>
		</item>
		<item>
			<title><![CDATA[Réponse à&#160;:  Iconv UTF-8 sans bom]]></title>
			<link>http://forum.ubuntu-fr.org/viewtopic.php?pid=11517401#p11517401</link>
			<description><![CDATA[<p>Ton script est un fichier <strong>bash</strong>, il vaut mieux ne pas le lancer avec <strong>sh</strong>.</p><div class="codebox"><pre><code>/chemin_du_script/ToUtf82.sh</code></pre></div><p>Même en le lançant avec <strong>sh</strong>, je ne reproduis pas l&#039;erreur. As-tu des fichiers avec des noms exotiques ?</p>]]></description>
			<author><![CDATA[dummy@example.com (pingouinux)]]></author>
			<pubDate>Thu, 15 Nov 2012 09:34:01 +0000</pubDate>
			<guid>http://forum.ubuntu-fr.org/viewtopic.php?pid=11517401#p11517401</guid>
		</item>
		<item>
			<title><![CDATA[Réponse à&#160;:  Iconv UTF-8 sans bom]]></title>
			<link>http://forum.ubuntu-fr.org/viewtopic.php?pid=11517331#p11517331</link>
			<description><![CDATA[<p>Merci beaucoup super, par contre même problème maintenant</p><div class="codebox"><pre><code>$ sh ToUtf82.sh
ToUtf82.sh: line 10: Erreur de syntaxe près du symbole inattendu « done »
ToUtf82.sh: line 10: `done&#039;</code></pre></div><p>Peut-être qui faut un truc a la fin du fichier pour cygwin ...</p>]]></description>
			<author><![CDATA[dummy@example.com (adryen31)]]></author>
			<pubDate>Thu, 15 Nov 2012 09:23:57 +0000</pubDate>
			<guid>http://forum.ubuntu-fr.org/viewtopic.php?pid=11517331#p11517331</guid>
		</item>
		<item>
			<title><![CDATA[Réponse à&#160;:  Iconv UTF-8 sans bom]]></title>
			<link>http://forum.ubuntu-fr.org/viewtopic.php?pid=11517241#p11517241</link>
			<description><![CDATA[<p>Bonjour,<br />Je n&#039;arrive pas à reproduire ton erreur.<br />Il faut mettre les noms de fichiers entre <strong>&quot; &quot;</strong>, au cas où ils contiendraient des espaces.<br />Ton script peut se simplifier comme ceci :</p><div class="codebox"><pre><code>#!/bin/bash
FROM=iso-8859-1
TO=UTF-8
ICONV=&quot;iconv -f $FROM -t $TO&quot;
# Convert
find Nouveau -type f | while read fn;
do
   $ICONV &quot;$fn&quot; &gt; &quot;$fn&quot;.bak
   awk &#039;{if(NR==1)sub(/^\xef\xbb\xbf/,&quot;&quot;);print}&#039; &quot;$fn&quot;.bak &gt; &quot;$fn&quot;
done</code></pre></div><p><span class="bbu">Édité</span> : Orthographe</p>]]></description>
			<author><![CDATA[dummy@example.com (pingouinux)]]></author>
			<pubDate>Thu, 15 Nov 2012 09:17:54 +0000</pubDate>
			<guid>http://forum.ubuntu-fr.org/viewtopic.php?pid=11517241#p11517241</guid>
		</item>
		<item>
			<title><![CDATA[Iconv UTF-8 sans bom]]></title>
			<link>http://forum.ubuntu-fr.org/viewtopic.php?pid=11516981#p11516981</link>
			<description><![CDATA[<p>Bonjour tout le monde,</p><p>voilà mon soucis j&#039;ai une arborescence de 1975 dossiers/fichiers à convertir en UTF-8 sans bom<br />s&#039;ils ne le sont pas déjà. Hors j&#039;ai réalisé ce petit script, pour info je le lance avec cygwin (et oui<br />malheureusement les fichiers sont sur un Windows ...).</p><div class="codebox"><pre><code>#!/bin/bash
FROM=iso-8859-1
TO=UTF-8
ICONV=&quot;iconv -f $FROM -t $TO&quot;
# Convert
find Nouveau/ -type f -name &quot;*&quot; | while read fn;
do
cp ${fn} ${fn}.bak
$ICONV &lt; ${fn}.bak &gt; ${fn}
rm ${fn}.bak
cp ${fn} ${fn}.bak
awk &#039;{if(NR==1)sub(/^\xef\xbb\xbf/,&quot;&quot;);print}&#039; &lt; ${fn}.bak &gt; ${fn}
done</code></pre></div><p>Pensez-vous que cela face correctement ce que je veux ? Car de plus en le lançant j&#039;ai l&#039;erreur<br />suivante:</p><div class="codebox"><pre><code>ToUtf82.txt: line 13: Erreur de syntaxe près du symbole inattendu « done »
ToUtf82.txt: line 13: `done&#039;</code></pre></div><p>Désolé pour mon incompétence en script, mais c&#039;est mon premier <img src="http://forum.ubuntu-fr.org/img/smilies/tongue.png" width="15" height="15" alt="tongue" /> donc commencer un script<br />avec du awk, iconv, et du cygwin&#160; ... je misère un peu</p><p>Merci beaucoup en tout cas.</p><p>Adryen 31</p>]]></description>
			<author><![CDATA[dummy@example.com (adryen31)]]></author>
			<pubDate>Thu, 15 Nov 2012 08:44:25 +0000</pubDate>
			<guid>http://forum.ubuntu-fr.org/viewtopic.php?pid=11516981#p11516981</guid>
		</item>
	</channel>
</rss>
