Encoding(conversion from bytes to chars)

Nah, that's decoding. :)

Anyway, that file has been double encoded. Unfortunately, that was a lossy conversion, it is not possible to get 100% of the original text back.

Run these two commands:

iconv -c -f utf8 -t windows-1253 < problem.txt > problem-1253.txt iconv -c -f utf8 -t ISO-8859-7 < problem.txt > problem-7.txt

iconv for Windows: http://gnuwin32.sourceforge.net/packages/libiconv.htm

The two resulting files are in UTF-8. Open them as UTF-8 in your editor. I can recognise some words like Νίκος, Νικόλα in fragments. You have to spend some time to piece the two files together.

As for your editor, Windows editors generally write out a BOM for UTF-8, too, even though it is only necessary for the two kinds of UTF-16 encoding. On Windows, an UTF-8 BOM has even some usefulness on normal text files. However, on Unix and on source code files in general an UTF-8 BOM is unwanted, mostly because it interferes with the shebang. You should switch off BOM for UTF-8 files in your editor, if that is not possible, get a better one.


In reply to Re^5: Encoding changed from Greek to somethign else by daxim
in thread Encoding changed from Greek to somethign else by Nik

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.