Hi,

I wonder if someone can offer some wisdom, please, regarding a problem that has come my way:

I have a UTF8 file that contains mixed Latin and Arabic text that was extracted from a database that was encoded as ISO-8859-1 - so, essentially, as I understand it, the file is a utf8 encoding, of an ISO-8859-1 encoding, of Latin and non-Latin text (don't ask! :-).

I am trying to parse this stuff into a format suitable for insertion into a UTF-8 database, but am having trouble with the non-Latin stuff. The Latin stuff is fine.

I have not needed to mess around with encodings much in the past, so am rather out of my depth. I have tried various alternative 'layerings' or 'raw', 'utf8', and 'iso-8859-1' to try to get back to something that will go into the database and display correctly, but so far with no luck - different combinations produce different output, of course; but so far none of it any more helpful than what I started with!

Is it even possible to achieve what I am attempting?? If so, any pointers would be most gratefully received!

Thanks in advance!

GRS


In reply to Encoding problem by grscott

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.