From mboxrd@z Thu Jan 1 00:00:00 1970 From: Francesco Pizzolante Subject: Re: Exporting non utf8 org documents Date: Fri, 08 Jan 2010 13:36:22 +0100 Message-ID: <87zl4o3ha1.fsf@missioncriticalit.com> References: <87my1tcu59.fsf@missioncriticalit.com> <6B5F0F7A-F055-435F-ADE2-846E99649B1D@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: In-Reply-To: <6B5F0F7A-F055-435F-ADE2-846E99649B1D-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> (Carsten Dominik's message of "Wed, 6 Jan 2010 09:26:35 +0100") List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org-mXXj517/zsQ@public.gmane.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org-mXXj517/zsQ@public.gmane.org To: Carsten Dominik Cc: mailing-list-org-mode Hi Carsten, > here is a possible solution: > > Please get the latest git version of org-mode. Then put the following code > into > .emacs: > > (defun my-org-export-latex-fix-inputenc () > "Set the codingsystem in inputenc to what the buffer is." > (let* ((cs buffer-file-coding-system) > (opt (latexenc-coding-system-to-inputenc cs))) > (when opt > (goto-char (point-min)) > (while (re-search-forward "\\\\usepackage\\[\\(.*?\\)\\] > {inputenc}" > nil t) > (goto-char (match-beginning 1)) > (delete-region (match-beginning 1) (match-end 1)) > (insert opt)) > (save-buffer)))) > > (eval-after-load "org-latex" > '(add-hook 'org-export-latex-after-save-hook > 'my-org-export-latex-fix-inputenc)) > > Let me know how it goes..... Thanks for your solution. I've tested with both latin1 and utf8 Org buffers and I get the correct encoding passed to LaTeX in both cases. Regarding the utf8 encoding, I had a remark in my first message, which was: >> In addition, Org should use the `utf8x' option (instead of `utf8') which >> enables to handle unbreakable spaces (useful in french). Could you change that too? Thanks a lot, Francesco _______________________________________________ Emacs-orgmode mailing list Please use `Reply All' to send replies to the list. Emacs-orgmode-mXXj517/zsQ@public.gmane.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode