title: Something wrong encoding using PowerShell
body: <p>I have a bat file where I encode some CSV files to UTF-8, and then import the files to a SQLite database.
  This is the code I have:</p>
  
  <pre><code>echo Codificando ficheros...
  powershell -Command "&amp;{ param($Path); (Get-Content $Path) | Out-File $Path -Encoding UTF8 }" CSVs\\prefijo.csv
  powershell -Command "&amp;{ param($Path); (Get-Content $Path) | Out-File $Path -Encoding UTF8 }" CSVs\\materiales.csv
  powershell -Command "&amp;{ param($Path); (Get-Content $Path) | Out-File $Path -Encoding UTF8 }" CSVs\\zonas.csv
  powershell -Command "&amp;{ param($Path); (Get-Content $Path) | Out-File $Path -Encoding UTF8 }" CSVs\\responsables.csv
  powershell -Command "&amp;{ param($Path); (Get-Content $Path) | Out-File $Path -Encoding UTF8 }" CSVs\\lideres.csv
  powershell -Command "&amp;{ param($Path); (Get-Content $Path) | Out-File $Path -Encoding UTF8 }" CSVs\\pass.csv
  powershell -Command "&amp;{ param($Path); (Get-Content $Path) | Out-File $Path -Encoding UTF8 }" CSVs\\capacidadLotes.csv
  powershell -Command "&amp;{ param($Path); (Get-Content $Path) | Out-File $Path -Encoding UTF8 }" CSVs\\boletosIndirectos.csv
  @echo OFF
  echo Generando fichero de base de datos _datosPrecargados.db...
  .\sqlite3.exe BaseDatos\_datosPrecargados.db &lt; Sentencias_sql\Sentencias_DatosPrecargados.sql
  @echo OFF
  echo Generando fichero de base de datos _inventario.db...
  .\sqlite3.exe BaseDatos\_inventario.db &lt; Sentencias_sql\Sentencias_Inventario.sql
  pause
  </code></pre>
  
  <p>Before I set the PowerShell lines to encode the files it worked fine. But before encoding I have a problem.
  The data base seems to be ok but when I do a select sentence looking for the first column of the first record, it is not found.</p>
  
  <p>E.G.
  Table "zones":</p>
  
  <pre><code>zone     name
  ----     ----
  Z001     Zone 1
  Z002     Zone 2
  Z002     Zone 3
  </code></pre>
  
  <p>If I execute the sentence <code>"SELECT * FROM zones"</code>, it lists all the records, ok.</p>
  
  <p>If I execute the sentence <code>"SELECT * FROM zones WHERE zone="Z002""</code>, the record is listed, ok.</p>
  
  <p>But if I execute the sentence <code>"SELECT * FROM zones WHERE zone="Z001""</code>, the record is not found.</p>
  
  <p>If I don't set the PowerShell line in the bat file, it doesn't happens and it works fine, but I need to encode the files because I have special characters inside the CSV files like "ñ" or "ó".</p>
  
  <p>I don´t know what can I am doing wrong.</p>
  
  <p>Thanks in advance!!</p>