I'm at a bit of a loss as to this one. I'm making use of the Net::eBay module, so that I can connect to my account + grab orders etc, ready to put into my DB. Now, this works just fine with normal characters - but with non-latin, it breaks. Here is the main code:
my $result = $ebay->submitRequest( "GetOrders",
{
DetailLevel => "ReturnAll",
ErrorLevel => "1",
SiteId => "1",
Verb => "GetOrders",
NumberOfDays => 2,
OrderRole => "Seller",
OrderStatus => "Completed",
IncludeFinalValueFee => 1
});
If I use Devel::Peek to take a look at the var giving me the issue, with:
use Devel::Peek;
use Encode;
my $str = $add->{address};
Dump $str;
Which gives me in SSH:
SV = PV(0x28fa060) at 0x15df1f0
REFCNT = 1
FLAGS = (PADMY,POK,IsCOW,pPOK,UTF8)
PV = 0x2d91730 ", Mario, Seestra\303\237e 12, Rodgau, 123456, Deutschland"\0 UTF8 ", Mario, Seestra\x{df}e 12, Rodgau, 123456, Deutschland"
CUR = 57
LEN = 72
COW_REFCNT = 1
FOO: , Mario, Seestraße 12, Rodgau, 123456, Deutschland
...but in the DB, I get:
Mario, Seestraße 12, Rodgau, 123456, Deutschland
The mySQL table and columns are collation => "
utf8_general_ci"
Anyone got any ideas? I've been battling this all morning, and still can't work out whats going on :/
TIA
Andy
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.