From 0c265078904d636985f8c990b7bfa833adc3edbe Mon Sep 17 00:00:00 2001 From: Georg Baum Date: Fri, 23 Feb 2007 20:13:06 +0000 Subject: [PATCH] * lib/encodings: Explain that only single byte encodings can be added easily * src/encoding.C (Encoding::Encoding): Better test for utf8 git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@17313 a592a061-630c-0410-9148-cb99ea01b6c8 --- lib/encodings | 5 +++++ src/encoding.C | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/lib/encodings b/lib/encodings index 1c60fc7ece..b05138119f 100644 --- a/lib/encodings +++ b/lib/encodings @@ -1,6 +1,11 @@ # FIXME: Have a look at the encodings known by the inputenc package and add # missing ones. Caution: File format change! +# Note that you can only add single byte encodings to this file without +# changing some C++ code. +# The only multibyte encoding that is currently supported is utf8, and this +# support is hardcoded to the iconv name "UTF-8". + # Order of names: LyX name LaTeX name iconv name Encoding utf8 utf8 UTF-8 diff --git a/src/encoding.C b/src/encoding.C index a4a5f4932a..9b18562823 100644 --- a/src/encoding.C +++ b/src/encoding.C @@ -214,7 +214,7 @@ Encoding::Encoding(string const & n, string const & l, string const & i) if (n == "ascii") // ASCII can encode 128 code points and nothing else start_encodable_ = 128; - if (n == "utf8" || n == "utf8x") + else if (i == "UTF-8") // UTF8 can encode all 1<<20 + 1<<16 UCS4 code points start_encodable_ = 0x110000; else {