|
|
|
|
||||||
| linux.debian.user debian-user@lists.debian.org. |
![]() |
|
|
LinkBack | Outils de la discussion |
|
|
#1 |
|
Messages: n/a
Hébergeur: |
I'm trying to get unicode to work in perl. When I do the 'textbook' example:
kloro@debian:~$ perl -e'binmode(STDOUT, ":utf8"); print chr(0x263a)' I get garbage, not a smiley face, i.e.: ⺠My environment is: kloro@debian:~$ env SSH_AGENT_PID=3589 TERM=xterm SHELL=/bin/bash CVSROOT=:ext:kloro@lotsaclocks.com:/home/bkovitz/cvsroot WINDOWID=4194356 LC_ALL=en_US USER=kloro LS_COLORS=no=00:fi=00:di=01;34:ln=01;36:pi=40;33:s o=01;35:do=01;35:bd=40;33;01:cd=40;33;01 r=40;31; 01:su=37;41:sg=30;43:tw=30;42 w=34;42:st=37;44:ex =01;32:*.tar=01;31:*.tgz=01;31:*.arj=01;31:*.taz=0 1;31:*.lzh=01;31:*.zip=01;31:*.z=01;31:*.Z=01;31:* .gz=01;31:*.bz2=01;31:*.deb=01;31:*.rpm=01;31:*.ja r=01;31:*.jpg=01;35:*.jpeg=01;35:*.gif=01;35:*.bmp =01;35:*.pbm=01;35:*.pgm=01;35:*.ppm=01;35:*.tga=0 1;35:*.xbm=01;35:*.xpm=01;35:*.tif=01;35:*.tiff=01 ;35:*.png=01;35:*.mov=01;35:*.mpg=01;35:*.mpeg=01; 35:*.avi=01;35:*.fli=01;35:*.gl=01;35:*.dl=01;35:* .xcf=01;35:*.xwd=01;35:*.flac=01;35:*.mp3=01;35:*. mpc=01;35:*.ogg=01;35:*.wav=01;35:SSH_AUTH_SOCK=/tmp/ssh-ZVhlTs3526/agent.3526 USERNAME=kloro DESKTOP_SESSION=IceWM PATH=/usr/local/bin:/usr/bin:/bin:/usr/bin/X11:/usr/games:/home/kloro/bin GDM_XSERVER_LOCATION=local PWD=/home/kloro lang=en_us.utkk LANG=EN_US.UTF8 GDMSESSION=IceWM HOME=/home/kloro SHLVL=1 LANGUAGE=en_US.UTF-8 PYTHONPATH=. LOGNAME=kloro CVS_RSH=ssh DBUS_SESSION_BUS_ADDRESS=unix:abstract=/tmp/dbus-BCGb2jBRcV,guid=90be2048635c502104dbc60046b8b5f1 DISPLAY=:0.0 COLORTERM=gnome-terminal XAUTHORITY=/tmp/.gdm5HJEWT _=/usr/bin/env kloro@debian:~$ Thanks in advance, tom arnall |
|
|
|
#2 |
|
Messages: n/a
Hébergeur: |
On Tue, Aug 07, 2007 at 03:01:04PM -0700, tom arnall wrote:
> I'm trying to get unicode to work in perl. When I do the 'textbook' example: > > kloro@debian:~$ perl -e'binmode(STDOUT, ":utf8"); print chr(0x263a)' > > I get garbage, not a smiley face, i.e.: > > ⺠> > My environment is: ... > LC_ALL=en_US ... > LANG=EN_US.UTF8 ... > LANGUAGE=en_US.UTF-8 Did you set LC_ALL? It is not set by default (at least not on my system). What is the output of locale (and why is your kmail sending ISO-8852-1 mails?) Regards, Andrei -- If you can't explain it simply, you don't understand it well enough. (Albert Einstein) -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.6 (GNU/Linux) iD8DBQFGuV+9qJyztHCFm9kRAhXqAJ0Z7RS1A7Yhp5SJyqKW8/x1/eSbXgCgm+xA 0dCV+TD3qs4aU570YQ7tVRE= =Yw9P -----END PGP SIGNATURE----- |
|
|
|
#3 |
|
Messages: n/a
Hébergeur: |
On Tue, Aug 07, 2007 at 03:01:04PM -0700, tom arnall wrote:
> I'm trying to get unicode to work in perl. When I do the 'textbook' example: > > kloro@debian:~$ perl -e'binmode(STDOUT, ":utf8"); print chr(0x263a)' > > I get garbage, not a smiley face, i.e.: > > ⺠> > My environment is: ... > LC_ALL=en_US ... > LANG=EN_US.UTF8 ... > LANGUAGE=en_US.UTF-8 Did you set LC_ALL? It is not set by default (at least not on my system). What is the output of locale (and why is your kmail sending ISO-8852-1 mails?) Regards, Andrei -- If you can't explain it simply, you don't understand it well enough. (Albert Einstein) -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.6 (GNU/Linux) iD8DBQFGuV+9qJyztHCFm9kRAhXqAJ0Z7RS1A7Yhp5SJyqKW8/x1/eSbXgCgm+xA 0dCV+TD3qs4aU570YQ7tVRE= =Yw9P -----END PGP SIGNATURE----- |
|
|
|
#4 |
|
Messages: n/a
Hébergeur: |
On Tuesday 07 August 2007 23:16, Andrei Popescu wrote:
> On Tue, Aug 07, 2007 at 03:01:04PM -0700, tom arnall wrote: > > I'm trying to get unicode to work in perl. When I do the 'textbook' > > example: > > > > kloro@debian:~$ perl -e'binmode(STDOUT, ":utf8"); print chr(0x263a)' > > > > I get garbage, not a smiley face, i.e.: > > > > ⺠> > > > My environment is: > > ... > > > LC_ALL=en_US > > ... > > > LANG=EN_US.UTF8 > > ... > > > LANGUAGE=en_US.UTF-8 > > Did you set LC_ALL? It is not set by default (at least not on my > system). What is the output of locale (and why is your kmail sending > ISO-8852-1 mails?) > > Regards, > Andrei 'env' gives: kloro@debian:~$ env ... LC_ALL=en_US ... LANG=en_US.UTF-8 ... LANGUAGE=en_US ... does this not give what LC_ALL is set to? 'locale' gives: kloro@debian:~$ locale LANG=en_US.UTF-8 LANGUAGE=en_US LC_CTYPE="en_US" LC_NUMERIC="en_US" LC_TIME="en_US" LC_COLLATE="en_US" LC_MONETARY="en_US" LC_MESSAGES="en_US" LC_PAPER="en_US" LC_NAME="en_US" LC_ADDRESS="en_US" LC_TELEPHONE="en_US" LC_MEASUREMENT="en_US" LC_IDENTIFICATION="en_US" LC_ALL=en_US what are 'ISO-8852-1 mails'? i appreciate your . tom arnall |
|
|
|
#5 |
|
Messages: n/a
Hébergeur: |
On Wed, Aug 08, 2007 at 12:42:23PM -0700, tom arnall wrote:
> > Did you set LC_ALL? It is not set by default (at least not on my > > system). What is the output of locale (and why is your kmail sending > > ISO-8852-1 mails?) > > > > Regards, > > Andrei > > 'env' gives: > > kloro@debian:~$ env > ... > LC_ALL=en_US > ... > LANG=en_US.UTF-8 > ... > LANGUAGE=en_US > ... > > does this not give what LC_ALL is set to? > > 'locale' gives: > > kloro@debian:~$ locale > LANG=en_US.UTF-8 > LANGUAGE=en_US > LC_CTYPE="en_US" > LC_NUMERIC="en_US" > LC_TIME="en_US" > LC_COLLATE="en_US" > LC_MONETARY="en_US" > LC_MESSAGES="en_US" > LC_PAPER="en_US" > LC_NAME="en_US" > LC_ADDRESS="en_US" > LC_TELEPHONE="en_US" > LC_MEASUREMENT="en_US" > LC_IDENTIFICATION="en_US" > LC_ALL=en_US I'm not an expert, but I think it's not very wise to mix locales. Set everything to en_US.UTF-8 try again. > what are 'ISO-8852-1 mails'? Your kmail was not set to send UTF-8 mails (did you change this?), but used the encoding ISO-8859-1 for the previous mail, that's why the smiley face you meant to send came up ... a bit different It's probably not related to your problem. Regards, Andrei -- If you can't explain it simply, you don't understand it well enough. (Albert Einstein) -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.6 (GNU/Linux) iD8DBQFGusINqJyztHCFm9kRAjyoAKCoXImNOZw9gRoXkL6L5s lD151kawCfUDUT TD1RheAEkcwG/9Z8dvGdA1M= =FvB0 -----END PGP SIGNATURE----- |
|
![]() |
| Outils de la discussion | |
|
|