Wide character in syswrite

Robert Rothenberg robrwo at gmail.com
Tue Dec 11 18:50:03 GMT 2007


On 11/12/07 16:20 Matt Lawrence wrote:

> I don't know specifically about this module, but it looks like it
> doesn't handle unicode at all, if the underlying dict service expects
> unicode, then it's a bug in the module. Otherwise, you can decode the
> input into the correct 8-bit character set with Encode, but this assumes
> that you know the character set to use.
> 
> I just tried typing canapé into http://www.dict.org/ and it wouldn't
> have it. "canape" worked fine though. I also note that the page was
> served as UTF-8, and the form was submitted as UTF-8 too.

The dict: protocol can handle UTF-8:

 $ telnet dict.org 2628
 Trying 72.36.131.187...
 Connected to dict.org.
 Escape character is '^]'.
 220 aspen.miranda.org dictd 1.9.15/rf on Linux 2.6.18-5-k7 <auth.mime>
 <14134363.7454.1197397449 at aspen.miranda.org>
 MATCH all exact canapé
 152 10 matches found
 eng-hun "canapé"
 fra-deu "canapé"
 fra-eng "canapé"
 fra-nld "canapé"
 nld-deu "canapé"
 nld-eng "canapé"
 nld-fra "canapé"
 por-deu "canapé"
 por-eng "canapé"
 spa-eng "canapé"
 .
 250 ok [d/m/c = 0/10/719; 0.000r 0.000u 0.000s]

I don't know if the problem is Net::Dict or Net::Cmd.

Strange thing is that I'm no longer able to reproduce the error. So maybe it
was something wrong with the server that's been fixed since I posted this?

Rob




More information about the london.pm mailing list