We came across an encoding problem while trying to use a file created on system using Latin1 encoding while our system (RedHat Linux) uses UTF-8 encoding.
In details: When we tried using this latin1 encoded file as an input (or rather when our system (utf8) tried to read this file(latin1)) we would get "Malformed UTF-8 .." errors. As we understand, this issue has 2 solutions: 1. Make the file compatible with your system's encoding by translating it from its original encoding to your system's encoding. One can do that with the help of iconv command: "iconv -f latin1 -t utf8 -o outfile infile" 2. Use binmode(). The second solution is to inform the system about the encoding to be used while reading from this file. This can be done by adding the following statement: binmode(FH,":encoding(latin1)") after the filehandle (FH) is opened and before the filehandle (FH) is actually used to read from. Thanks, Anagha PS: An interesting and very informative chain of mails regarding this issue: http://groups.google.com/group/comp.lang.perl.misc/browse_thread/thread/4e1800f6eac52650/86cf1b6ba0841e1f%2386cf1b6ba0841e1f?sa=X&oi=groupsr&start=1&num=3 (sorry for the links length!) __________________________________ Yahoo! Mail - PC Magazine Editors' Choice 2005 http://mail.yahoo.com ------------------------ Yahoo! Groups Sponsor --------------------~--> Fair play? Video games influencing politics. Click and talk back! http://us.click.yahoo.com/T8sf5C/tzNLAA/TtwFAA/dpFolB/TM --------------------------------------------------------------------~-> Yahoo! Groups Links <*> To visit your group on the web, go to: http://groups.yahoo.com/group/ngram/ <*> To unsubscribe from this group, send an email to: [EMAIL PROTECTED] <*> Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/