--- /dev/null
+#LyX 2.3 created this file. For more info see http://www.lyx.org/
+\lyxformat 509
+\begin_document
+\begin_header
+\save_transient_properties true
+\origin unavailable
+\textclass article
+\use_default_options true
+\begin_modules
+logicalmkup
+\end_modules
+\maintain_unincluded_children false
+\language english
+\language_package default
+\inputencoding utf8-plain
+\fontencoding global
+\font_roman "default" "default"
+\font_sans "default" "default"
+\font_typewriter "default" "default"
+\font_math "auto" "auto"
+\font_default_family default
+\use_non_tex_fonts false
+\font_sc false
+\font_osf false
+\font_sf_scale 100 100
+\font_tt_scale 100 100
+\use_microtype false
+\graphics default
+\default_output_format default
+\output_sync 0
+\bibtex_command default
+\index_command default
+\paperfontsize default
+\spacing single
+\use_hyperref false
+\papersize default
+\use_geometry false
+\use_package amsmath 1
+\use_package amssymb 1
+\use_package cancel 1
+\use_package esint 1
+\use_package mathdots 1
+\use_package mathtools 1
+\use_package mhchem 1
+\use_package stackrel 1
+\use_package stmaryrd 1
+\use_package undertilde 1
+\cite_engine basic
+\cite_engine_type default
+\biblio_style plain
+\use_bibtopic false
+\use_indices false
+\paperorientation portrait
+\suppress_date false
+\justification true
+\use_refstyle 1
+\index Index
+\shortcut idx
+\color #008000
+\end_index
+\secnumdepth 3
+\tocdepth 3
+\paragraph_separation indent
+\paragraph_indentation default
+\quotes_language english
+\papercolumns 1
+\papersides 1
+\paperpagestyle default
+\tracking_changes false
+\output_changes false
+\html_math_output 0
+\html_css_as_file 0
+\html_be_strict false
+\end_header
+
+\begin_body
+
+\begin_layout Standard
+¹²³¼½¬¸@ł€¶←
+\end_layout
+
+\begin_layout Standard
+ätsch Grüße, em- and en-dash: — ―
+\end_layout
+
+\end_body
+\end_document
# \ding{58} and \ding{171} not supported with XeTeX and system fonts:
export/examples/fr/ListesPuces_pdf4_systemF
+# inputencoding="utf8-plain" with Xe/LuaTeX: characters with
+# Unicode point > 256 lead to errors with 8-bit fonts
+# (We keep this option for power users setting Unicode fonts in the preamble
+# or document class file).
+export/export/utf8-plain-with-tex-fonts_.*_texF
Sublabel: texissues
#
# Non-ASCII char in verbatim environment is dropped (with a warning when
# doing this interactively) with ASCII (and hence also with XeTeX).
export/doc/(|de/|es/|fr/)EmbeddedObjects_pdf4_texF
+
+# inputencoding="utf8-plain" with 8-bit TeX: non-ASCII characters are passed
+# as two 8-bit characters leading to garbage in the output
+export/export/utf8-plain-with-tex-fonts_(dvi|pdf.?)
{
OutputParams runparams = runparams_in;
- // XeTeX with TeX fonts is only safe with ASCII encoding,
- // but the "flavor" is not known in BufferParams::encoding().
- if (!params().useNonTeXFonts && (runparams.flavor == OutputParams::XETEX))
+ // XeTeX with TeX fonts is only safe with ASCII encoding (see also #9740),
+ // Check here, because the "flavor" is not known in BufferParams::encoding()
+ // (power users can override this safety measure selecting "utf8-plain").
+ if (!params().useNonTeXFonts && (runparams.flavor == OutputParams::XETEX)
+ && (runparams.encoding->name() != "utf8-plain"))
runparams.encoding = encodings.fromLyXName("ascii");
string const encoding = runparams.encoding->iconvName();
OutputParams runparams = runparams_in;
// XeTeX with TeX fonts is only safe with ASCII encoding,
- // but the "flavor" is not known in BufferParams::encoding().
- if (!params().useNonTeXFonts && (runparams.flavor == OutputParams::XETEX))
+ // Check here, because the "flavor" is not known in BufferParams::encoding()
+ // (power users can override this safety measure selecting "utf8-plain").
+ if (!params().useNonTeXFonts && (runparams.flavor == OutputParams::XETEX)
+ && (runparams.encoding->name() != "utf8-plain"))
runparams.encoding = encodings.fromLyXName("ascii");
// FIXME: when only the current paragraph is shown, this is ignored
// (or not reached) and characters encodable in the current
// XeTeX/LuaTeX: (see also #9740)
// With Unicode fonts we use utf8-plain without encoding package.
// With TeX fonts, we cannot use utf8-plain, but "inputenc" fails.
- // XeTeX must use ASCII encoding, for LuaTeX, we load
- // "luainputenc" (see below).
+ // XeTeX must use ASCII encoding (see Buffer.cpp),
+ // for LuaTeX, we load "luainputenc" (see below).
if (useNonTeXFonts || features.runparams().flavor == OutputParams::XETEX)
return;