Warning

 

Close

Confirm Action

Are you sure you wish to do this?

Confirm Cancel
BCM
User Panel

Site Notices
Posted: 9/25/2014 2:38:10 PM EDT
I have a perl script that uses http to fetch and parse some web data based on data in an already existing .dat file that matches data from the web page.

Everything works except cases where the web page displays a phrase with the é character.  I have that exact phrase that appears in the web page in my dat file but the script never picks it up.  All other data from the web page that matches lines from the .dat file does work

I think this is a unicode issue, but not sure where to go.  I use VI editor

EDIT:
my local file was utf-8 unicode which uses c3a9 to represent é and the webpage uses windows-1252 unicode which is e9 for the é.  apparently, as smart as perl is, even when telling 1 string that it is utf8 and telling the other string it is iso-8859-1 (which is also e9 for the é) then even when comparing the 2 strings with eq and both strings contain just é that they still arent eq
Close Join Our Mail List to Stay Up To Date! Win a FREE Membership!

Sign up for the ARFCOM weekly newsletter and be entered to win a free ARFCOM membership. One new winner* is announced every week!

You will receive an email every Friday morning featuring the latest chatter from the hottest topics, breaking news surrounding legislation, as well as exclusive deals only available to ARFCOM email subscribers.


By signing up you agree to our User Agreement. *Must have a registered ARFCOM account to win.
Top Top