Wide character in syswrite

Matt Lawrence matt.lawrence at virgin.net
Tue Dec 11 17:35:28 GMT 2007


Philip Newton wrote:
> On Dec 11, 2007 4:35 PM, Robert Rothenberg <robrwo at gmail.com> wrote:
>   
>> So I'm experimenting with Net::Dict and have a problem when I submit certain
>> words with wide characters (e.g. Polish L-slash):
>>
>>  Wide character in syswrite at /usr/local/share/perl/5.8.8/Net/Cmd.pm line
>> 232, <STDIN> line 2.
>>
>> Does anyone know of a workaround for this?
>>     
>
> Explicitly encode your characters into bytes in the way expected by
> the network protocol? (Whether that's Latin-1 or UTF-8 or ... is
> something you'd have to find out, I think.)
>   
Ah. The RFC says it wants UTF-8 [1], so I would guess the right thing to
do is to Encode::decode('UTF-8', ...) before passing into the module.
That should at least suppress the warning, whether it actually works
correctly is a whole other matter.

Matt

[1] http://www.faqs.org/rfcs/rfc2229.html  Section 2.2




More information about the london.pm mailing list