Commit Graph

44 Commits

Author SHA1 Message Date
Juergen Spitzmueller
0a8294d426 Improve encoding GUI string 2019-06-26 08:57:05 +02:00
Günter Milde
c627507b3f Revert 051de65db and implement alternative fix for remainder of #11115. 2019-06-12 11:48:47 +02:00
Günter Milde
051de65db9 Fix remainder of #11115.
Implement GUI suggestions from
https://www.lyx.org/trac/ticket/11115#comment:26
2019-06-05 11:18:36 +02:00
Günter Milde
197735747e Support for documents in other scripts with parts in CJK scripts.
Fix CJK support for documents using input-encoding "utf8-cjk"
when the main language is not Chinese, Korean, or Japanese.
2019-01-24 00:40:51 +01:00
Günter Milde
41055bab88 Fix handling of Thai tis620-0 input encoding.
The Thai tis620-0 input encoding is supported via the inputenc "plug in"
(data) file tis620.def from https://ctan.org/pkg/babel-thai.

We can handle it like the other contributed input encodings, e.g.,
Greek (ISO 8859-7) and the several Cyrillic encodings from
http://www.ctan.org/pkg/latex-cyrillic.

Under TeXLive 2018, the input encoding defaults to utf8, if there is no call to
inputenc. The added test file fails without the patch but compiles fine, if the
file "tis620.def" is present in the TEXPATH.
2019-01-09 09:23:16 +01:00
Juergen Spitzmueller
931f87f508 Introduce "inherit" encoding for latex_language
This gets rid of the hardcoded latin1 encoding for verbatim. Instead,
verbatim now inherits the encoding from the context, which is what is
actually wanted here.

Fixes: #9012, #9258
2017-12-24 17:10:42 +01:00
Günter Milde
418016bf79 Remove unsupported encoding "pt254".
This encoding (modified Mac Cyrillic for Asian languages) is rarely used and not supported by Gnu iconv.

Update comments in lib/encodings.

Update ctests: Gnu iconv only supports cp858, if configured with "--enable-extra-encodings".
2016-12-06 14:04:50 +01:00
Günter Milde
7bb07f179a Mark failing encodings. See #10502. 2016-11-22 11:48:16 +01:00
Uwe Stöhr
e7e6d07e84 encodings: use correct encoding "latin7" for ISO 8859-13
This fixes bug #10474 properly, thanks Günter
2016-11-08 00:04:02 +01:00
Günter Milde
ad767b159d Add a comment about iso-8859-7 not supported by standard inputenc. 2015-11-21 23:07:33 +01:00
Julien Rioux
9dd1b7c578 Use the LyX name of encodings instead of the LaTeX names.
- Use the LyX name of encodings instead of the LaTeX names.
  The LyX name must be unique, while the name used by LaTeX
  not necessarily, e.g. different packages might implement
  support for the same encoding.

- Rename koi8 to koi8-r, so that the LyX and LaTeX names match.

- Rename euc-jp-plain to euc-jp-platex, jis-plain to jis-platex
  and shift-jis-plain to shift-jis-platex.

- Add utf8-platex encoding (fixes #8408).

LyX file format incremented to 463.
2013-02-18 23:52:42 +01:00
Juergen Spitzmueller
c9f4ce4cc1 Revert 'Additional support for Japanese pLaTeX with utf8 encoding (#8408).'
This is a file format change; also, the lyx name must be unique. See discussion on the tracker.
2013-01-13 16:13:09 +01:00
Georg Baum
ee3ce572a0 Fix import of shift-jis and big5 CJK texts.
These encodings were not defined, since they must not be used as document
encodings (the characters {, } and \ may appear in high bytes, and latex
would be confused). However, they are supported by CJK.sty (which uses a
preprocessor to circumvent the limitations of the latex executable). These
encodings are now defined, but used for import in tex2lyx only.
The test case CJK.tex contained fake tests for shift-jis and big5 (the
japanese and chinese characters were entered using the utf8 encoding), and
therefore the wrong interpretation of these encoding looked as if it worked.
The comments about missing iconv support of shift-jis and big5 were wrong as
well (otherwise shift-jis-plain would not work either).
2012-12-30 20:52:50 +01:00
Pavel Sanda
76e66aaea8 Additional support for Japanese pLaTeX with utf8 encoding (#8408).
Patch from Koji.
2012-11-06 20:25:32 +01:00
Julien Rioux
0bff66b8a5 Pass the encoding to the japanese pLaTeX processor (#4697).
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@39982 a592a061-630c-0410-9148-cb99ea01b6c8
2011-10-25 23:10:19 +00:00
Jean-Marc Lasgouttes
18b808e67c add "ansinew" as a synonym of LaTeX encoding "cp1252" (second part of #6142)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@31439 a592a061-630c-0410-9148-cb99ea01b6c8
2009-09-22 13:05:43 +00:00
Jürgen Spitzmüller
bd4c74b3b7 * add support for the applemac encoding. File format change.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@30064 a592a061-630c-0410-9148-cb99ea01b6c8
2009-06-12 08:47:38 +00:00
Jürgen Spitzmüller
2adb15b7b3 * lib/encodings: revert accidental string change.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@26204 a592a061-630c-0410-9148-cb99ea01b6c8
2008-08-19 07:05:09 +00:00
Jürgen Spitzmüller
a2906cb877 ** proper implementation of pLaTeX by Tetsuya Makimura and me, fixes many remaining problems and bugs with language "japanese" (bugs 4863, 4290, 4700 and partially 4697) **
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@26200 a592a061-630c-0410-9148-cb99ea01b6c8
2008-08-18 17:26:09 +00:00
Pavel Sanda
db200daf6f Encoding typo
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@25886 a592a061-630c-0410-9148-cb99ea01b6c8
2008-07-25 23:03:52 +00:00
Jürgen Spitzmüller
dcc4d58b66 *** Implement GUI names for encodings (part of bug 4971) ***
* lib/encodings:
	- add new column "GUI names"

* src/Encoding.{cpp,h}:
	- read in and handle GUI names

* src/frontends/qt4/GuiDocument.cpp:
	- display GUI names instead of LaTeX names

* po/lyx_pot.py:
* po/Rules-lyx:
* development/scons/SConstruct:
	- add encoding GUI names to the po files.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@25558 a592a061-630c-0410-9148-cb99ea01b6c8
2008-07-11 08:56:17 +00:00
Jürgen Spitzmüller
612e52b093 Back to CJK sanity I: Fix bug 4698 and 4696.
* lib/encodings:
* src/support/docstream.h:
	- JIS is not a valid iconv name. Rename to ISO-2022-JP

* src/output_latex.cpp:
	- fix wrong encoding switch.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@25510 a592a061-630c-0410-9148-cb99ea01b6c8
2008-07-09 07:21:02 +00:00
Uwe Stöhr
30663a8019 Fileformat change.
Provide only one Japanese language that is encoding independent, patch partly by Koji Yokata.
This fixes http://bugzilla.lyx.org/show_bug.cgi?id=4597

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@24053 a592a061-630c-0410-9148-cb99ea01b6c8
2008-03-29 23:25:40 +00:00
Uwe Stöhr
c3c98d0d3b encodings: disable the new SJIS-plain encoding as long as we don't support it properly, see http://www.mail-archive.com/lyx-devel@lists.lyx.org/msg129935.html
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@20930 a592a061-630c-0410-9148-cb99ea01b6c8
2007-10-11 23:41:57 +00:00
Uwe Stöhr
14eb8d4d0a encodings: add dummy encodings for plain Japanese support (Patch by Yokata san)
languages: add a second Japanese language entry that doesn't use CJK

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@20831 a592a061-630c-0410-9148-cb99ea01b6c8
2007-10-08 00:18:11 +00:00
Uwe Stöhr
a91ace6761 lib/encodings: fix typo in comment
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@18225 a592a061-630c-0410-9148-cb99ea01b6c8
2007-05-07 18:25:25 +00:00
Jürgen Spitzmüller
9ff14f38ef * lib/encodings: just a tiny reordering: move utf8-plain to those encodings that do not load a package.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@18219 a592a061-630c-0410-9148-cb99ea01b6c8
2007-05-07 06:00:29 +00:00
Uwe Stöhr
80b94c6bf5 Georg's patch for bug 3043:
Introduces new encodings for the CJK-languages.
The CJK-languages can now be selected from LyX's menu.
For remaining small problems, see the thread "Help needed for bug 3043" on the devel-list.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@18216 a592a061-630c-0410-9148-cb99ea01b6c8
2007-05-06 20:26:02 +00:00
Jürgen Spitzmüller
ced73c33e6 * lib/encodings:
- add new encoding utf8-plain for the sake of XeTeX users (bug 3526)
* src/BufferParams.cpp:
	- implement new encoding (skip inputenc)
	- fix logic error with thailatex

* src/Buffer.cpp:
* lib/lyx2lyx/LyX.py:
* lib/lyx2lyx/lyx_1_5.pyx:
* development/FORMAT:
	- format increment to 267
	- reset encoding to utf8 on reversion.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@18198 a592a061-630c-0410-9148-cb99ea01b6c8
2007-05-04 12:27:00 +00:00
Uwe Stöhr
227f80157c file format change: support for Armenian
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@18155 a592a061-630c-0410-9148-cb99ea01b6c8
2007-05-01 17:48:04 +00:00
Georg Baum
0c26507890 * 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
2007-02-23 20:13:06 +00:00
Georg Baum
6bf6c8453d add pure ASCII encoding for LaTeX export
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@17224 a592a061-630c-0410-9148-cb99ea01b6c8
2007-02-16 18:29:48 +00:00
Georg Baum
9fd8a86961 Allow utf8x \inputencoding
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@17164 a592a061-630c-0410-9148-cb99ea01b6c8
2007-02-13 17:36:55 +00:00
Georg Baum
244b2c1fab Add some more LaTeX encodings, fix thailatex and display all available
encodings in the preferences dialog

	* src/LaTeXFeatures.C: special treatment for tis620-0 encoding
	* src/bufferparams.C: ditto
	* src/output_latex.C: ditto

	* src/encoding.[Ch]: Add the possibility to iterate over all encodings

	* src/paragraph_pimpl.C: Add latin10 and cp858 to Euro treatment

	* src/buffer.C: Update format number

	* src/frontends/qt4/QDocumentDialog.C: Don't hardcode available
	encodings

	* lib/lyx2lyx/LyX.py,
	  lib/lyx2lyx/lyx_1_5.py: implement conversion from 256 to 255

	* lib/encodings: Add some encodings, fix all "unknown" entries

	* development/FORMAT: Document file format change


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16418 a592a061-630c-0410-9148-cb99ea01b6c8
2006-12-28 18:15:25 +00:00
Georg Baum
c9e75d84ac enable utf8 since lyx2lyx already reverts it
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@15704 a592a061-630c-0410-9148-cb99ea01b6c8
2006-11-03 10:38:30 +00:00
Georg Baum
fa1856440c Restore inputenc support
* src/encoding.h
	(encoding_table): remove, this is no longer needed with unicode
	(iconvName_): new member: name of the encoding in iconv syntax

	* src/exporter.C
	(Exporter::Export): Use return value of Buffer::makeLaTeXFile

	* src/buffer.[Ch]
	(Buffer::makeLaTeXFile): return whether the file has been created
	successfully

	* src/buffer.C
	(Buffer::makeLaTeXFile): Use a docstream that converts to the correct
	encoding
	Display an error dialog is something went wrong

	* src/bufferparams.C
	(BufferParams::writeLaTeX): Undo the utf8 inputenc hack

	* src/frontends/qt4/QDocumentDialog.C: Add some FIXMEs

	* src/support/unicode.[Ch]
	(eightbit_to_ucs4): New conversion function
	(ucs4_to_eightbit): New conversion function

	* src/support/docstream.[Ch]
	(utf8_codecvt_facet_exception): Move to header and rename to
	iconv_codecvt_facet_exception
	(odocfstream): Take the encoding as argument

	* src/support/docstream.C
	(utf8_codecvt_facet): Generalize to other encodings than utf8 and
	rename to iconv_codecvt_facet

	* src/encoding.C: Remove obsolete tables

	* src/output_latex.C
	(TeXOnePar): Convert the paragraph to different encoding if needed

	* lib/encodings: Remove obsolete tables


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@15564 a592a061-630c-0410-9148-cb99ea01b6c8
2006-10-26 15:01:45 +00:00
Martin Vermeer
e7d12d308e Latin-7 patch
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@8819 a592a061-630c-0410-9148-cb99ea01b6c8
2004-06-22 06:08:11 +00:00
Angus Leeming
a60b5c0b72 Whitespace only.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@7905 a592a061-630c-0410-9148-cb99ea01b6c8
2003-10-13 09:50:10 +00:00
Jean-Marc Lasgouttes
64f38ce0cb better cyrillic languages support
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@4525 a592a061-630c-0410-9148-cb99ea01b6c8
2002-07-03 14:18:32 +00:00
Jean-Marc Lasgouttes
346924c584 add iso8859-15 support
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@2020 a592a061-630c-0410-9148-cb99ea01b6c8
2001-05-22 13:27:52 +00:00
Jean-Marc Lasgouttes
44a5985e18 preliminary Thai support
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@1686 a592a061-630c-0410-9148-cb99ea01b6c8
2001-03-06 13:46:08 +00:00
Jean-Marc Lasgouttes
b5ab33c92d serbo-croatian support
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@1682 a592a061-630c-0410-9148-cb99ea01b6c8
2001-03-06 11:04:43 +00:00
Jean-Marc Lasgouttes
765859f144 Ukrainian support
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@1400 a592a061-630c-0410-9148-cb99ea01b6c8
2001-01-26 10:31:18 +00:00
Jean-Marc Lasgouttes
bd659b25fb Dekel language/encoding patch + a few fixes
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@1096 a592a061-630c-0410-9148-cb99ea01b6c8
2000-10-10 12:36:36 +00:00