Results 1 to 3 of 3

Thread: PERL: Convert UTF-16 encoded file to ASCII

  1. #1
    Senior Member
    Join Date
    Apr 2002
    Posts
    417

    PERL: Convert UTF-16 encoded file to ASCII

    Hi

    I get this log file that is created by Retrospect 6.0 (windows) and
    it
    seems to be encoded as UTF-16.

    when I try to split lines by tabs I get weird results. Is there
    anyway to convert the encoding to ASCII in PERL? I can't change this
    through the software.

    thanx,
    -Jose-

  2. #2

    Re:PERL: Convert UTF-16 encoded file to ASCII

    I know there are modules for UTF-8 conversion to other UTF's and ASCII but I've not come accross one for UTF-16. Your best bet is to check out search.cpan.org and look up UTF and see what you get. Keep us posted!

  3. #3
    Senior Member
    Join Date
    Apr 2002
    Posts
    417

    Re:PERL: Convert UTF-16 encoded file to ASCII

    Ok,

    It seems that perl isn't the problem here. PERL can read the files just fine. I was using ActiveState Komodo 2.3 as my IDE. The output that I was viewing was garbage but when I printed the results to a file instead, it works fine. Komodo just has a problem with UTF-16 encoding (or something) .

    I suppose in general with IDE's, if you are getting wierd results, don't always trust the IDE's output.

Similar Threads

  1. convert a Corel file to PowerPoint 2003 format
    By regix in forum Windows - General Topics
    Replies: 0
    Last Post: 01-04-2005, 02:07 AM
  2. Some Perl Questions, File::Find Module
    By shebang in forum Linux - Software, Applications & Programming
    Replies: 18
    Last Post: 04-03-2004, 07:25 PM
  3. rename mp3 files to mp3 encoded names
    By Blaqb0x in forum General Chat
    Replies: 3
    Last Post: 04-02-2004, 06:16 AM
  4. PERL: edit File handle on the fly
    By Blaqb0x in forum Linux - Software, Applications & Programming
    Replies: 2
    Last Post: 01-15-2004, 10:20 PM
  5. perl, including a file /more/ than once
    By gorn in forum Linux - Software, Applications & Programming
    Replies: 4
    Last Post: 07-08-2002, 10:18 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •