X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2Ftex2lyx%2Ftext.cpp;h=50eee93a3d2291596ee63140d7afac665298232f;hb=8e7b5eebf0ef9742e5f6983d8f55f563c12a31ab;hp=8ebed0f53f3a0e227f8adab73772ad7aa73cb186;hpb=e7d1e5b0c96d14802ac1a157da95d6dfe2954860;p=lyx.git diff --git a/src/tex2lyx/text.cpp b/src/tex2lyx/text.cpp index 8ebed0f53f..50eee93a3d 100644 --- a/src/tex2lyx/text.cpp +++ b/src/tex2lyx/text.cpp @@ -2119,6 +2119,25 @@ void parse_text(Parser & p, ostream & os, unsigned flags, bool outer, have_CJK = false; } + // it is impossible to determine the correct encoding for non-CJK Japanese. + // Therefore write a note at the beginning of the document + if (is_nonCJKJapanese) { + context.check_layout(os); + begin_inset(os, "Note Note\n"); + os << "status open\n\\begin_layout Plain Layout\n" + << "\\series bold\n" + << "Important information:\n" + << "\\end_layout\n\n" + << "\\begin_layout Plain Layout\n" + << "This document is in Japanese (non-CJK).\n" + << " It was therefore impossible for tex2lyx to determine the correct encoding." + << " The encoding EUC-JP was assumed. If this is incorrect, please set the correct" + << " encoding in the document settings.\n" + << "\\end_layout\n"; + end_inset(os); + is_nonCJKJapanese = false; + } + #ifdef FILEDEBUG debugToken(cerr, t, flags); #endif