Perl scraping script not recognising certain characters

Posted by user1849286 on Stack Overflow See other posts from Stack Overflow or by user1849286
Published on 2012-11-24T11:02:11Z Indexed on 2012/11/24 11:04 UTC
Read the original article Hit count: 129

Filed under:
|

I have a script that works fine locally but on the server fails.

It displays the non-breaking space symbol

   

as

?

when printing to standard output.

In the parsing of the page, if I try to get rid of non breaking space symbol with

s/ //g

nothing happens, neither getting rid of the question mark

s/?//g

It seems to stick no matter what.

Bizzarely, this is not an issue when running the script locally.

Additionally, question marks within a diamond symbol are inserted everywhere (on both the server script and the local script) instead of apostrophes, although at least that is not causing the parsing of the page to break on the local page.

Confused, pls help.

© Stack Overflow or respective owner

Related posts about perl

Related posts about mojolicious