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.
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
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".
- 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.
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).
* 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
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
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
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
- 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
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
* 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