From mboxrd@z Thu Jan 1 00:00:00 1970 From: Achim Gratz Subject: Re: [OT] Encoding error when calling a ruby script from Emacs using shell-command Date: Sat, 01 Sep 2012 09:28:32 +0200 Message-ID: <87d326rylb.fsf@Rainer.invalid> References: <7522.1346442688@alphaville> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Return-path: Received: from eggs.gnu.org ([208.118.235.92]:49627) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1T7i8L-00024m-Fk for emacs-orgmode@gnu.org; Sat, 01 Sep 2012 03:28:46 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1T7i8K-0004vm-C3 for emacs-orgmode@gnu.org; Sat, 01 Sep 2012 03:28:45 -0400 Received: from plane.gmane.org ([80.91.229.3]:52723) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1T7i8K-0004vd-4d for emacs-orgmode@gnu.org; Sat, 01 Sep 2012 03:28:44 -0400 Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1T7i8K-0000yd-Ka for emacs-orgmode@gnu.org; Sat, 01 Sep 2012 09:28:44 +0200 Received: from pd9eb4738.dip.t-dialin.net ([217.235.71.56]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sat, 01 Sep 2012 09:28:44 +0200 Received: from Stromeko by pd9eb4738.dip.t-dialin.net with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sat, 01 Sep 2012 09:28:44 +0200 List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-orgmode@gnu.org Marcelo de Moraes Serpa writes: > So, I did this: > > (defun test () >   (setenv "LANG" "en_US.UTF-8") >   (setenv "LC_ALL" "en_US.UTF-8") >   (setenv "LC_CTYPE" "en_US.UTF-8") >         (shell-command  "/Users/myself/.rvm/bin/rvm ruby-1.9.3-p194 do > /usr/bin/rubyscript") >         ) This is nonsense, may I suggest you read locale (1p)? If you set LC_ALL, this overrides the other two settings no matter what they are set to (and you may prevent some scripts trying to set LC_COLLATE or something like that from functioning correctly). Unless you really need such a big hammer, set LANG (this provides the default) and leave it at that. Regards, Achim. -- +<[Q+ Matrix-12 WAVE#46+305 Neuron microQkb Andromeda XTk Blofeld]>+ Factory and User Sound Singles for Waldorf Q+, Q and microQ: http://Synth.Stromeko.net/Downloads.html#WaldorfSounds