emacs-orgmode
[Top][All Lists]
Advanced

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

[Orgmode] Exporting non utf8 org documents


From: Francesco Pizzolante
Subject: [Orgmode] Exporting non utf8 org documents
Date: Tue, 08 Dec 2009 17:22:58 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1.50 (windows-nt)

Hi,

I have colleagues who are writing Org documents with latin-1 encoding and when
I export these documents to LaTeX I run into problems, because Org assumes
utf8.

Here's a little example:

--8<---------------cut here---------------start------------->8---
#+LATEX_CLASS: article

* Ceci est un test

  Voici un petit texte rédigé en français.

* COMMENT Setup

# This is for the sake of Emacs.
# Local Variables:
# coding: iso-latin-1
# End:
--8<---------------cut here---------------end--------------->8---

The exportation to LaTeX gives the following result:

--8<---------------cut here---------------start------------->8---
% Created 2009-12-08 mar. 17:10
\documentclass[11pt]{article}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{graphicx}
\usepackage{longtable}
\usepackage{float}
\usepackage{wrapfig}
\usepackage{soul}
\usepackage{amssymb}
\usepackage{hyperref}
\usepackage{xcolor}
\usepackage{listings}

\title{org-french}
\author{Francesco Pizzolante}
\date{08 décembre 2009}

\begin{document}

\maketitle

\setcounter{tocdepth}{3}
\tableofcontents
\vspace*{1cm}

\section{Ceci est un test}
\label{sec-1}


  Voici un petit texte rédigé en français.



\end{document}
--8<---------------cut here---------------end--------------->8---

When compiling, due to the \usepackage[utf8]{inputenc} directive, I get this
error:

ERROR: Package utf8x Error: MalformedUTF-8sequence.


In order to fix this issue, I see the following solutions:

- Would it be possible for Org to automatically get the coding system of the
  buffer and then generate the correct option for the inputenc package?

or

- Would it be possible to have a variable like #+CODING-SYSTEM: iso-latin-1
  which would be used to generate the correct option for the inputenc package?

Any other proposition or idea is welcome.

In addition, Org should use the `utf8x' option (instead of `utf8') which
enables to handle unbreakable spaces (useful in french).

Thanks.

Regards,
Francesco




reply via email to

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