Lars Gullik Bjønnes wrote:
> Juergen Spitzmueller <[EMAIL PROTECTED]>
> writes:
>
> | Looks impressive. Congratulations.
> | I think you are aware of the fact that the LaTeX output is not working
> | yet. E.g. the euro sign exports as "8364", the German ß (sharp s) as
> | "223" and your beloved ø as "248".
I hope everybody is also aware of the fact that current trunk can not
correctly read existing documents with 8bit chars in the old encoding and
will probably produce garbage of them.
> I have not cared one iota about latex output so far.
> (Or any other output but .lyx for that matter.)
And .lyx output needs to be in a new file format. I think of something like
the attached, but that needs to be revised: Until now, \inputencoding
specifies both the encoding of the .lyx file and the .tex file. In the
future the .lyx file will always be encoded in utf-8, but I am not sure
whether we can do that with .tex files also or whether we still need to be
able to output latin1 or whatever .tex files.
Maybe we should not change the value of \inputencoding, but only the
semantics: In the new format, \inputencoding will only be used for the
encoding of .tex file, not the .lyx file.
> | Is it worth filing bug reports for such cases already? If so, we
> | probably should create a "unicode" keyword or component on bugzilla.
>
> No. Just fix the problems.
IMO latex output is the most important one now. Connected to that is a
proper file format change.
Georg
Index: src/buffer.C
===================================================================
--- src/buffer.C (Revision 14667)
+++ src/buffer.C (Arbeitskopie)
@@ -146,7 +146,7 @@ extern BufferList bufferlist;
namespace {
-int const LYX_FORMAT = 248;
+int const LYX_FORMAT = 249;
} // namespace anon
Index: lib/lyx2lyx/LyX.py
===================================================================
--- lib/lyx2lyx/LyX.py (Revision 14667)
+++ lib/lyx2lyx/LyX.py (Arbeitskopie)
@@ -73,7 +73,7 @@ format_relation = [("0_06", [200], ge
("1_2", [220], generate_minor_versions("1.2" , 4)),
("1_3", [221], generate_minor_versions("1.3" , 7)),
("1_4", range(222,246), generate_minor_versions("1.4" , 3)),
- ("1_5", range(246,249), generate_minor_versions("1.5" , 0))]
+ ("1_5", range(246,250), generate_minor_versions("1.5" , 0))]
def formats_list():
Index: lib/lyx2lyx/lyx_1_5.py
===================================================================
--- lib/lyx2lyx/lyx_1_5.py (Revision 14667)
+++ lib/lyx2lyx/lyx_1_5.py (Arbeitskopie)
@@ -225,6 +225,17 @@ def convert_utf8(document):
document.inputencoding = "utf-8"
document.encoding = "utf-8"
+
+def revert_utf8(document):
+ i = find_token(document.header, "\\inputencoding", 0)
+ if i == -1:
+ document.header.append("\\inputencoding auto")
+ else:
+ document.header[i] = "\\inputencoding auto"
+ document.inputencoding = "auto"
+ document.encoding = document.get_encoding(document.language, document.inputencoding)
+
+
##
# Conversion hub
#
@@ -232,11 +243,11 @@ def convert_utf8(document):
supported_versions = ["1.5.0","1.5"]
convert = [[246, []],
[247, [convert_font_settings]],
- [248, []]
- # ,[xxx, [convert_utf8]] uncomment to support convertion to utf-8
- ]
+ [248, []],
+ [249, [convert_utf8]]]
-revert = [[247, [revert_booktabs]],
+revert = [[248, [revert_utf8]],
+ [247, [revert_booktabs]],
[246, [revert_font_settings]],
[245, [revert_framed]]]