in reply to Re^5: UTF8 issue when getting website via LWP::UserAgent in Perl
in thread UTF8 issue when getting website via LWP::UserAgent in Perl
So, I know it's all confusing. Took me forever. But it's actually really simple. A string of bytes is nothing. It's just binary data. You have to know what it's supposed to be and tell your code when coming from binary and going back to it. The raw stuff doesn't know (well, some charsets do have BOM flags but it's not something on which you can rely here). Your DBI/DBD driver can do the encode/decode two-step for you automatically as I suggested (might work even if table definition is wrong but it's best to ensure it's in agreement). :P Examples of the setting to check include–
Update: s/simply/simple/;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^7: UTF8 issue when getting website via LWP::UserAgent in Perl
by afoken (Chancellor) on May 12, 2016 at 20:50 UTC | |
|
Re^7: UTF8 issue when getting website via LWP::UserAgent in Perl
by ultranerds (Hermit) on May 12, 2016 at 15:46 UTC | |
by runrig (Abbot) on May 12, 2016 at 15:58 UTC | |
by ultranerds (Hermit) on May 12, 2016 at 15:59 UTC |