|Think about Loose Coupling|
how to read from utf8 text file?by MelaOS (Beadle)
|on Jul 01, 2008 at 11:24 UTC||Need Help??|
MelaOS has asked for the
wisdom of the Perl Monks concerning the following question:
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