title: Bulk-convert non-UTF-8 and UTF-8-with-BOM files to UTF-8
body: <p>Heey i'm trying to create new files with the <code>find</code> command in bash on Ubuntu.</p>
  <p>I can easily list the files and know how to create a new file from it however i don't want the encoding to come with it.</p>
  <p>Right now i'm using this command: <code>find ./Polish\ 2\ \(copy\)/ -name '*.txt' -type f -exec sh -c 'cat &lt;&quot;$0&quot; &gt;&quot;$0.txt&quot;' {} \;</code>
  however if a file is for example not in UTF-8 format i'd still want to write the new file <code>$0.txt</code> in a UTF-8 format.</p>
  <p>I came upon this idea since whenever i'm doing this manually:</p>
  <ol>
  <li>I open the nonUTF8 file in gedit.</li>
  <li>Copy the contents.</li>
  <li>Create a new blank file.</li>
  <li>Open it with gedit.</li>
  <li>Paste the copied contents to the file and save</li>
  </ol>
  <p>The default behavior of gedit is saving to UTF8 in my case. However with over 30.000 files to do this to i don't want to do this manually..</p>
  <p>Any solutions with default builtin tools?</p>
  <h1>EDIT</h1>
  <p>The file may be edited on the fly instead of creating a seperate file like i did in my example.</p>
  <p>Also what does happen when trying to convert the file with <code>iconv</code> if the file is already in <code>UTF-8</code> format?</p>
  <h1>EDIT 2.0</h1>
  <p>I'd love to have all the files in the end without <code>BOM</code></p>