From 06b4c287823648a416dcf8b26c7517aed7245f30 Mon Sep 17 00:00:00 2001 From: Darcy Shen Date: Tue, 21 Nov 2023 15:03:20 +0800 Subject: [PATCH] [69_5] Unicode: fix file inclusion MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: 沈浪熊猫儿 --- TeXmacs/progs/generic/generic-edit.scm | 2 +- src/Typeset/Env/env_exec.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/TeXmacs/progs/generic/generic-edit.scm b/TeXmacs/progs/generic/generic-edit.scm index 2f5fd464e5..c871c9e030 100644 --- a/TeXmacs/progs/generic/generic-edit.scm +++ b/TeXmacs/progs/generic/generic-edit.scm @@ -842,7 +842,7 @@ (insert-go-to `(inactive (specific ,s "")) '(0 1 0)))) (tm-define (make-include u) - (insert `(include ,(url->delta-unix u)))) + (insert `(include ,(utf8->cork (url->delta-unix u))))) (tm-define (make-inline-image l) (apply make-image (cons* (url->delta-unix (car l)) #f (cdr l)))) diff --git a/src/Typeset/Env/env_exec.cpp b/src/Typeset/Env/env_exec.cpp index 05741e4c84..9c77a3123b 100644 --- a/src/Typeset/Env/env_exec.cpp +++ b/src/Typeset/Env/env_exec.cpp @@ -109,7 +109,7 @@ edit_env_rep::rewrite (tree t) { case VAR_INCLUDE: { if (N(t) == 0) return tree (ERROR, "invalid include"); - url file_name= url_unix (exec_string (t[0])); + url file_name= url_unix (cork_to_utf8 (exec_string (t[0]))); url file_rel = relative (base_file_name, file_name); if (file_rel == base_file_name) return tree (ERROR, "invalid self include");