Note that there are some explanatory texts on larger screens.

plurals
  1. POHow can I convert Cyrillic stored as LATIN1 ( sql ) to true UTF8 Cyrillic with iconv?
    text
    copied!<p>I have a SQL dump file consisting of incorrectly stored Cyrillic Russian ( WINDOWS-1251 ) text, example <code>Èðàíñêèå</code> which should properly be displayed as <code>Иранские</code>.</p> <p>In the past I have successfully converted the sql file but memory fails in what I did and in what order.</p> <p>Logically it would make sense that since it's stored in LATIN1 I would convert from LATIN1 to WINDOWS-1251 and then from WINDOWS-1251 to UTF-8//TRANSLIT or something like that.</p> <p>So far I've tried:</p> <h1>1.</h1> <pre><code>iconv -f WINDOWS-1251 -t UTF-8//TRANSLIT -o new.sql snippet.sql </code></pre> <p>Output:</p> <p><code>Èðàíñêèå</code> ( Not what I want )</p> <h1>2.</h1> <pre><code>iconv -f LATIN1 -t UTF-8//TRANSLIT -o new.sql snippet.sql </code></pre> <p>Output:</p> <p><code>Ã&lt;88&gt;ðàíñêèå</code> ( Not what I want either )</p> <p><strong>Notes</strong></p> <ul> <li><p>It's possible that I might have converted once and then twice to get my desired result, but I'm pretty sure that on the last step I converted from <code>WINDOWS-1251</code> to <code>UTF-8//TRANSLIT</code> as that was written down in my notes.</p></li> <li><p>One other note is that I'm viewing <code>Èðàíñêèå</code> in the SQL file when the file encoding is utf8 ( native in vim ). If I do <code>set enc=latin1</code> in vim then I see <code>~Hð| íñêèå</code> as if that doesn't make it more confusing.</p></li> </ul>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload