From mboxrd@z Thu Jan 1 00:00:00 1970 From: Bernt Hansen Subject: Re: encoding problem Date: Wed, 30 May 2012 12:29:45 -0400 Message-ID: <87aa0pk4xy.fsf@norang.ca> References: <87mx4q0z95.fsf@free.fr> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([208.118.235.92]:51547) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SZlmR-0003fZ-Jd for emacs-orgmode@gnu.org; Wed, 30 May 2012 12:29:55 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SZlmP-0007gc-Tw for emacs-orgmode@gnu.org; Wed, 30 May 2012 12:29:51 -0400 Received: from mho-01-ewr.mailhop.org ([204.13.248.71]:64918) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SZlmP-0007gJ-Qo for emacs-orgmode@gnu.org; Wed, 30 May 2012 12:29:49 -0400 In-Reply-To: <87mx4q0z95.fsf@free.fr> (Julien Cubizolles's message of "Wed, 30 May 2012 11:55:18 +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: Julien Cubizolles Cc: emacs-orgmode@gnu.org Julien Cubizolles writes: > I'm having a very strange problem with character encoding. I write all > my text files with emacs, with non-ascii characters (I'm french). I keep > a copy of many files (latex/org/...) on separate machines using > unison. Very often after a synchronization, the non-ascii charaters are > completely displayed wrong (=C3=83=C2=A0 for =C3=A0, =C3=83=C2=A7 for =C3= =A7) in the org files, but > never in the latex files. > > I guess it's more an Emacs than org files but I can't see what's special > in the org files that makes them more prone to such errors. > > Is there a way to *fix* easily these corruptions on a file, ie searching > for all "weird" characters to replace=C2=A0? > > How could I prevent this from happening again (checking/changing > character encoding maybe=C2=A0?) > > Thanks for your help, > > Julien. Hi Julien, I get prompts for encoding when saving/exporting (on Windows only) so I put the following at the top of my org-files --8<---------------cut here---------------start------------->8--- # -*- coding: utf-8 -*- --8<---------------cut here---------------end--------------->8--- which seems to fix the problem for me. Maybe this will help? Bernt