[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Remote encoding failure and suggested fix

From: Pete Forman
Subject: Remote encoding failure and suggested fix
Date: Fri, 04 Jan 2008 16:33:00 +0000

I was unable to open remote files using Tramp if they had non-ASCII
characters.  The file encodings were either UTF-8 or ISO-8859-1
specified either with file-coding-system-alist or using C-u C-x C-f to
open the remote file.  The error message in emacs is

Wrong type argument: stringp, nil

Turning up the verbosity of Tramp pointed me to
tramp-perl-encode-with-module.  I was able to reproduce the problem in
a session on the remote host invoking perl directly.  The remote file
is in iso-8859-1-unix and contains characters such as fractions and

% perl -MMIME::Base64 -0777 -ne 'print encode_base64($_)' doc/adsl.txt
Wide character in subroutine entry at -e line 1, <> chunk 1.

The underlying problem is that my locale is en_US.UTF-8.  This
invocation works.

% env LC_CTYPE=C perl -MMIME::Base64 -0777 -ne 'print encode_base64($_)' doc/adsl.txt

Feeding this back into Tramp, I reckon that another entry is needed in
tramp-remote-process-environment, "LC_CTYPE=C" to precede "LC_TIME=C".
That seems to do the trick by my using customize-variable.

Tramp 2.1.12 on XEmacs 21.5.28 Windows native though I'd seen this on
earlier versions too.

Pete Forman                -./\.-  Disclaimer: This post is originated
WesternGeco                  -./\.-   by myself and does not represent
address@hidden    -./\.-   the opinion of Schlumberger or           -./\.-   WesternGeco.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]