Kinda new to Perl. I am using Perl web API to get the data. The error is “application/xml; charset=UTF-8”. I used ‘use utf8’ but doesn’t seem to work. The line it gets stuck looks something like this
my @candidates = $c->bookmarks_for(start => 1, tag =>'pubmed');
Can you please help me.
Thank you,
Sammed
The
is only (and only) for one thing. When you will use in your source code utf8 characters. For example:
For any other thins, for example:
you should use
In the case, when your get_some_data returning octets (bytes).
For example, when reading text files, you can tell perl utf8 conversion at IO level with,
Or you can use the open pragma for telling perl using utf8 as default at IO layer
Here is no short answer. You really should read:
Perl is extremely strong in utf8 processing, but you must know, hot to use it properly – unfortunately, here is no shorter way as RTFM…
And note: here are differences in utf8 processing in perl <5.6, 5.6, 5.8, 5.12, 5.14…