hi there all fellow monks,

i have a mysql in unix, which i later use > dump file command line to retrieve the content of the table, and then later via winscp, i download these files to window. i then want to have a perl script which can read these text files into ms access database. problem is i can't seem to be able to read the utf8 text file properly.

when i open the text file in notepad, i can see gibberish, but when i open them in words and use encoding to utf8, i can see my words fine. so does this mean that my file is already in utf8? as i've read that perl stores stuff internally as utf8 i shouldn't have problem reading the text file and inserting them into a ms access database right?

i'm totally stuck at the reading part, as i'm unsure what is wrong and how to proceed from here. any help would be more than helpful. and for the reading i'm using a basic open line command as open with "<:utf8" seems to make stuff gibberish. and how i double check is to have perl output the read lines back into another output text file.

hope this is clear enough. thanks

~n00b1e


In reply to how to read from utf8 text file? by MelaOS

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.