<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	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/"
	
	>
<channel>
	<title>
	Comments on: How to Convert Files to UTF-8 Encoding in Linux	</title>
	<atom:link href="https://www.tecmint.com/convert-files-to-utf-8-encoding-in-linux/feed/" rel="self" type="application/rss+xml" />
	<link>https://www.tecmint.com/convert-files-to-utf-8-encoding-in-linux/</link>
	<description>Tecmint - Linux Howtos, Tutorials, Guides, News, Tips and Tricks.</description>
	<lastBuildDate>Thu, 13 Jul 2023 15:22:49 +0000</lastBuildDate>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	
	<item>
		<title>
		By: Antonio		</title>
		<link>https://www.tecmint.com/convert-files-to-utf-8-encoding-in-linux/comment-page-1/#comment-1577872</link>

		<dc:creator><![CDATA[Antonio]]></dc:creator>
		<pubDate>Wed, 01 Sep 2021 19:53:17 +0000</pubDate>
		<guid isPermaLink="false">http://www.tecmint.com/?p=23273#comment-1577872</guid>

					<description><![CDATA[Thank you very much, this was exactly what I was looking for!]]></description>
			<content:encoded><![CDATA[<p>Thank you very much, this was exactly what I was looking for!</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Preethi Nair		</title>
		<link>https://www.tecmint.com/convert-files-to-utf-8-encoding-in-linux/comment-page-1/#comment-1483580</link>

		<dc:creator><![CDATA[Preethi Nair]]></dc:creator>
		<pubDate>Thu, 29 Apr 2021 11:29:54 +0000</pubDate>
		<guid isPermaLink="false">http://www.tecmint.com/?p=23273#comment-1483580</guid>

					<description><![CDATA[Hi,

While converting a csv file to UTF8, using the below command I am getting the error like:
&lt;pre&gt;
iconv: illegal input sequence at position 5857689
&lt;/pre&gt;
Command :
&lt;pre&gt;
$ iconv -f ASCII -t UTF-8 EDMTradesFeed_20210428.csv -o EDMTradesFeed.csv
&lt;/pre&gt;
What would have gone wrong here? Can you please help?

Thanks]]></description>
			<content:encoded><![CDATA[<p>Hi,</p>
<p>While converting a csv file to UTF8, using the below command I am getting the error like:</p>
<pre>
iconv: illegal input sequence at position 5857689
</pre>
<p>Command :</p>
<pre>
$ iconv -f ASCII -t UTF-8 EDMTradesFeed_20210428.csv -o EDMTradesFeed.csv
</pre>
<p>What would have gone wrong here? Can you please help?</p>
<p>Thanks</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: suresh		</title>
		<link>https://www.tecmint.com/convert-files-to-utf-8-encoding-in-linux/comment-page-1/#comment-1391619</link>

		<dc:creator><![CDATA[suresh]]></dc:creator>
		<pubDate>Wed, 18 Nov 2020 18:39:01 +0000</pubDate>
		<guid isPermaLink="false">http://www.tecmint.com/?p=23273#comment-1391619</guid>

					<description><![CDATA[In reply to &lt;a href=&quot;https://www.tecmint.com/convert-files-to-utf-8-encoding-in-linux/comment-page-1/#comment-1102348&quot;&gt;Aaron Kili&lt;/a&gt;.

It is failing with huge files. Is there a way to avoid data loss?]]></description>
			<content:encoded><![CDATA[<p>In reply to <a target="_blank" href="https://www.tecmint.com/convert-files-to-utf-8-encoding-in-linux/comment-page-1/#comment-1102348">Aaron Kili</a>.</p>
<p>It is failing with huge files. Is there a way to avoid data loss?</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Manjeet		</title>
		<link>https://www.tecmint.com/convert-files-to-utf-8-encoding-in-linux/comment-page-1/#comment-1203800</link>

		<dc:creator><![CDATA[Manjeet]]></dc:creator>
		<pubDate>Mon, 15 Jul 2019 08:10:49 +0000</pubDate>
		<guid isPermaLink="false">http://www.tecmint.com/?p=23273#comment-1203800</guid>

					<description><![CDATA[In reply to &lt;a href=&quot;https://www.tecmint.com/convert-files-to-utf-8-encoding-in-linux/comment-page-1/#comment-1201771&quot;&gt;Aaron Kili&lt;/a&gt;.

Hi Aaron,

File is not that big, it is failing for number of records more than &lt;strong&gt;700&lt;/strong&gt;, and no of columns will be 5-7 and our file is having Latin America and Chinese data as well. We have done as below, Kindly suggest if we can discuss over google chat.
&lt;pre&gt;
Our Script 
#!/bin/bash
cd $SRCFILEDIR

for f in *txt
do

encoding=$(file -b --mime-encoding $f)

        if [ utf-8 != $encoding ] &#038;&#038; [ us-ascii != $encoding ] &#038;&#038; [ binary != $encoding ]; then
                iconv -f $encoding -t utf-8 $f -o $f
        else
                echo $encoding
        fi
done 
&lt;/pre&gt;
We get below error :
&lt;pre&gt;
us-ascii -- converted successfully
us-ascii -- converted successfully
binary -- converted successfully
./testing.sh: line 6:  1156 Bus error               (core dumped) iconv -f $encoding -t utf-8 $f -o $f
./testing.sh: line 6:  1161 Bus error               (core dumped) iconv -f $encoding -t utf-8 $f -o $f
&lt;/pre&gt;]]></description>
			<content:encoded><![CDATA[<p>In reply to <a target="_blank" href="https://www.tecmint.com/convert-files-to-utf-8-encoding-in-linux/comment-page-1/#comment-1201771">Aaron Kili</a>.</p>
<p>Hi Aaron,</p>
<p>File is not that big, it is failing for number of records more than <strong>700</strong>, and no of columns will be 5-7 and our file is having Latin America and Chinese data as well. We have done as below, Kindly suggest if we can discuss over google chat.</p>
<pre>
Our Script 
#!/bin/bash
cd $SRCFILEDIR

for f in *txt
do

encoding=$(file -b --mime-encoding $f)

        if [ utf-8 != $encoding ] &amp;&amp; [ us-ascii != $encoding ] &amp;&amp; [ binary != $encoding ]; then
                iconv -f $encoding -t utf-8 $f -o $f
        else
                echo $encoding
        fi
done 
</pre>
<p>We get below error :</p>
<pre>
us-ascii -- converted successfully
us-ascii -- converted successfully
binary -- converted successfully
./testing.sh: line 6:  1156 Bus error               (core dumped) iconv -f $encoding -t utf-8 $f -o $f
./testing.sh: line 6:  1161 Bus error               (core dumped) iconv -f $encoding -t utf-8 $f -o $f
</pre>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Aaron Kili		</title>
		<link>https://www.tecmint.com/convert-files-to-utf-8-encoding-in-linux/comment-page-1/#comment-1201771</link>

		<dc:creator><![CDATA[Aaron Kili]]></dc:creator>
		<pubDate>Sat, 13 Jul 2019 07:07:47 +0000</pubDate>
		<guid isPermaLink="false">http://www.tecmint.com/?p=23273#comment-1201771</guid>

					<description><![CDATA[In reply to &lt;a href=&quot;https://www.tecmint.com/convert-files-to-utf-8-encoding-in-linux/comment-page-1/#comment-1199804&quot;&gt;Manjeet&lt;/a&gt;.

@Manjeet

How big is the file you are working with? The script should work with huge files.]]></description>
			<content:encoded><![CDATA[<p>In reply to <a target="_blank" href="https://www.tecmint.com/convert-files-to-utf-8-encoding-in-linux/comment-page-1/#comment-1199804">Manjeet</a>.</p>
<p>@Manjeet</p>
<p>How big is the file you are working with? The script should work with huge files.</p>
]]></content:encoded>
		
			</item>
	</channel>
</rss>
