in reply to Re^3: Problem displaying unicode for certain websites
in thread Problem displaying unicode for certain websites

Thanks ikegami! Your code gives me -
Oj, f\x{00e5}r vi ingen mat?!
instead of -
Oj, får vi ingen mat?!
How come?

Replies are listed 'Best First'.
Re^5: Problem displaying unicode for certain websites
by Anonymous Monk on Dec 12, 2009 at 11:25 UTC
    I updated all my modules and it seems the line -
    $decoded_text = decode_entities($decoded_text);
    isn't doing anything. I'm getting the following output for "www.expressen.se" with your code -
    Spela Uno! Det klassiska kortspelet i digital form. Redo att byta jobb? H\x{00e4}r kan du s\x{00f6}ka bland m\x{00e4}ngder av annonser. L\x{00f6}rdag 12 december 2009 Tipsa Expressen
      I get
              Spela Scrabble!
          
              Bilda så bra ord som 
      
      möjligt med brickorna.
          
      
      
          
          
              Lördag 12 december 2009
              
                           Tipsa Expressen
      

      It looks like your locale isn't detected correctly. Try using binmode on STDOUT instead of using use open.