open with encoding(utf8) takes forever

Discussion in 'Perl' started by Erik Sandblom, May 28, 2004.

  1. Hi,

    I'm trying to open a utf-8 file with a long line, 2000 characters or
    so. It works with the top method, but the second method gags when it
    hits the long line:

    open FILE, "gc.html";
    open FILE, '<:encoding(utf8)', "gc.html";

    Here is my whole script; I confess that utf-8 and I don't get along
    very well:

    #!/usr/bin/perl -w

    use utf8;

    open FILE, '<:encoding(utf8)', "gc.html";
    while ($line = <FILE>) {
    print $line;
    }
    close FILE;

    # gc.html is http://www.greencargo.com/templates/NewsListPage.aspx?id=31
    # long line is on line 56

    many thanks in advance,
    Erik Sandblom
     
    Erik Sandblom, May 28, 2004
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Helixpoint

    This takes forever!!!!!!!!

    Helixpoint, Jul 29, 2003, in forum: ASP .Net
    Replies:
    1
    Views:
    508
    Helixpoint
    Jul 29, 2003
  2. =?Utf-8?B?RGF2aWQgVGhpZWxlbg==?=

    Takes forever to create a new project

    =?Utf-8?B?RGF2aWQgVGhpZWxlbg==?=, Feb 12, 2005, in forum: ASP .Net
    Replies:
    6
    Views:
    391
    Aquila Deus
    Feb 14, 2005
  3. Roedy Green
    Replies:
    2
    Views:
    338
    Roedy Green
    Aug 5, 2003
  4. Lothar Kimmeringer

    Re: creating ObjectInputStream takes forever

    Lothar Kimmeringer, Jul 31, 2003, in forum: Java
    Replies:
    3
    Views:
    625
    Blah Blah
    Aug 1, 2003
  5. Lex
    Replies:
    3
    Views:
    7,397
    jason
    Dec 30, 2005
Loading...

Share This Page