From 3c6d892c067b4dbee9c70266fd513d5697377f13 Mon Sep 17 00:00:00 2001 From: Darcy Shen Date: Tue, 12 Nov 2024 14:42:21 +0800 Subject: [PATCH 1/3] wip --- TeXmacs/tests/11_38.scm | 6 +++++- src/Data/Convert/Verbatim/verbatim.cpp | 3 +++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/TeXmacs/tests/11_38.scm b/TeXmacs/tests/11_38.scm index 3a853791d..4b8897235 100644 --- a/TeXmacs/tests/11_38.scm +++ b/TeXmacs/tests/11_38.scm @@ -7,6 +7,10 @@ (check (cork->utf8 (string-append cork_60 cork_27)) => "‘'") (check (strict-cork->utf8 (string-append cork_60 cork_27)) => "‘'"))) +(define (test-verbatim-to-tree) + (check (verb) => )) + (tm-define (test_11_38) - (test-single-quote)) + (test-single-quote) + (test-verbatim-to-tree)) diff --git a/src/Data/Convert/Verbatim/verbatim.cpp b/src/Data/Convert/Verbatim/verbatim.cpp index a94dfa103..b1eb5671b 100644 --- a/src/Data/Convert/Verbatim/verbatim.cpp +++ b/src/Data/Convert/Verbatim/verbatim.cpp @@ -304,7 +304,10 @@ encode (string s, string enc) { tree verbatim_to_tree (string s, string enc) { + cout << "verbatim: " << LF << s << LF; + cout << "enc: " << enc << LF; s= encode (s, enc); + cout << "encoded: " << s << LF; int i, j; int s_N= N (s); for (i= 0; i < s_N; i++) From 3675f29fec9205cf36a9f0a6e80536cb0d5dd9de Mon Sep 17 00:00:00 2001 From: Darcy Shen Date: Tue, 12 Nov 2024 15:11:22 +0800 Subject: [PATCH 2/3] wip --- src/Data/Convert/Verbatim/verbatim.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Data/Convert/Verbatim/verbatim.cpp b/src/Data/Convert/Verbatim/verbatim.cpp index b1eb5671b..0e37af89f 100644 --- a/src/Data/Convert/Verbatim/verbatim.cpp +++ b/src/Data/Convert/Verbatim/verbatim.cpp @@ -296,7 +296,7 @@ un_special (string s) { static string encode (string s, string enc) { if (enc == "auto") return western_to_cork (s); - else if (enc == "utf-8") return utf8_to_herk (s); + else if (enc == "utf-8") return utf8_to_cork (s); else if (enc == "iso-8859-1") return tm_encode (s); else if (enc == "SourceCode") return sourcecode_to_cork (s); else return tm_encode (s); From 060f923abc4a86c662d7769431469af496f1130f Mon Sep 17 00:00:00 2001 From: Darcy Shen Date: Tue, 12 Nov 2024 15:11:32 +0800 Subject: [PATCH 3/3] Revert "wip" This reverts commit 3c6d892c067b4dbee9c70266fd513d5697377f13. --- TeXmacs/tests/11_38.scm | 6 +----- src/Data/Convert/Verbatim/verbatim.cpp | 3 --- 2 files changed, 1 insertion(+), 8 deletions(-) diff --git a/TeXmacs/tests/11_38.scm b/TeXmacs/tests/11_38.scm index 4b8897235..3a853791d 100644 --- a/TeXmacs/tests/11_38.scm +++ b/TeXmacs/tests/11_38.scm @@ -7,10 +7,6 @@ (check (cork->utf8 (string-append cork_60 cork_27)) => "‘'") (check (strict-cork->utf8 (string-append cork_60 cork_27)) => "‘'"))) -(define (test-verbatim-to-tree) - (check (verb) => )) - (tm-define (test_11_38) - (test-single-quote) - (test-verbatim-to-tree)) + (test-single-quote)) diff --git a/src/Data/Convert/Verbatim/verbatim.cpp b/src/Data/Convert/Verbatim/verbatim.cpp index 0e37af89f..0aef24336 100644 --- a/src/Data/Convert/Verbatim/verbatim.cpp +++ b/src/Data/Convert/Verbatim/verbatim.cpp @@ -304,10 +304,7 @@ encode (string s, string enc) { tree verbatim_to_tree (string s, string enc) { - cout << "verbatim: " << LF << s << LF; - cout << "enc: " << enc << LF; s= encode (s, enc); - cout << "encoded: " << s << LF; int i, j; int s_N= N (s); for (i= 0; i < s_N; i++)