[Lcdproc] Unicode characters

Helmut A. Bender hab@helmut-bender.de
Tue Apr 17 17:59:02 2007


Am Dienstag, 17. April 2007 15:48 schrieb Andrea Carpani:
> Bernhard Walle wrote:
> > * Andrea Carpani <andrea@carpani.net> [2007-04-16 14:59]:
> >> I'm using  lcdproc 0.5.1 and a hd44780 hardware. I have a small perl
> >> client that works as a mp3 jukebox. Names for directories and files are
> >> unicode encoded, and when I show them on my lcd I get - correct
> >> characters for normal characters, - 2 weird characters for each
> >> character in the unicode set: =FC, =E0, =E8 and so on.
> >> I need some help from you: is there a way I can see these chars
> >> correctly on my LCD or I should try some sort of "normalization" when I
> >> display them?
> >
> > AFAIK you have to convert unicode to iso-8859-1 before sending the
> > strings to lcdproc. I did this in my lcd-stuff client
> > (http://lcd-stuff.sf.net).
>
> Thanks, I'll try this.
> Anyone has such code in perl?

Try
use Encode;
$iso_string =3D encode("iso-8859-1", decode_utf8($your_string));

The decode_utf8() is only needed if perl doesn't know that the string is ut=
f8=20
coded.

=2D-=20
Gru=DF
Helmut