Dear omniscient monks,
i try to translate big text files with composite charsets to a constant UTF8 encoding.
anyway my investingation to this topic run into a black whole of nescience.. whats the best way to do it especially with perl?
perhaps you can give me hints or some "simple" explanations how you would do it? i know that there are CPAN::modules to identify "non-utf8" chars but on which level? is it sensefull to take the binary way or to make a comparison on the hexadecimal level?
this is the first time i really get involved with perl into the whole charset jungle..
i´m still mindmapping ;))
kindly, perlig
---- UPDATE ----
Ok. Maybe the Input looks like this:
Textfile with 100 Chars:
40 of them were Italian (it) iso-8859-1, windows-1252
20 of them were Greek (el) iso-8859-7
all others UTF8
(see e.g. http://www.w3.org/International/O-charset-lang.html)
Now i want to process this data.. but my parser is only able to read utf8.
for that i have to encode these 60 "non-utf8" chars to utf8 on a certain way..
got it? :)
i´m nearly overstrained :P can you mabe tell me something about the existing guessing modules?!
kindly perlig
$perlig =~ s/pec/cep/g if 'errors expected';
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: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.