From: Gary <help-gnu-emacs@garydjones.name>
To: help-gnu-emacs@gnu.org
Subject: I need to use UTF8... sometimes
Date: Wed, 06 Oct 2010 13:35:22 +0200 [thread overview]
Message-ID: <i8hmtp$n3h$1@dough.gmane.org> (raw)
Okay, here is the situation. My local environment uses ISO-8559-1
("latin-1") -
,----
| $ env | grep -iE "(LANG|LC_)"
| LC_MESSAGES=en_US.ISO-8859-1
| LANG=de_CH.ISO-8859-1
| LC_TIME=en_GB.ISO-8859-1
`----
I now need to be able to transfer files *inside emacs* to a remote
server. I intended to use the following simple function to do that:
,----
| (defun foo-upload-buffer ()
| "Uploads the current (foo) buffer."
| (interactive)
|
| (eshell-command
| (concat foo-scp buffer-file-name " "
| foo-server-user "@" foo-server ":" foo-server-path))
| )
`----
and then found out that the server ("foo-server", above) expects the
files to be in UTF-8 :(
I don't really want to change my use of ISO-8559-1 for various reasons,
not least of all being that I deal with lots of other systems that
expect files in that encoding. Nor do I really want to use UTF-8 locally
for these particular files, because it means I can't grep them
properly.
So what I am wondering is what the easiest way is to do the transfer
using UTF-8 but still edit locally in ISO-8559-1. I wondered if
foo-upload-buffer should write the buffer to a temporary file, convert
it to UTF-8, and then transfer that, but it seems a bit longwinded. Any
other ideas?
--
Gary Please do NOT send me 'courtesy' replies off-list.
GNU Emacs 23.2.1
emacsclient 23.2
next reply other threads:[~2010-10-06 11:35 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-10-06 11:35 Gary [this message]
2010-10-06 11:55 ` I need to use UTF8... sometimes Eli Zaretskii
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='i8hmtp$n3h$1@dough.gmane.org' \
--to=help-gnu-emacs@garydjones.name \
--cc=help-gnu-emacs@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).