Gnuplot 터미널의 유니코드

Gnuplot 터미널의 유니코드

예를 들어, bash 명령줄에서 ~/.XComposeCompose 키와 임시 파일을 사용하여 델타 문자를 입력할 수 있지만 Gnuplot에서 동일한 작업을 시도하면 다음과 같은 오류가 발생합니다.

13:48 boffi@debian:~ $ δ
bash: δ: command not found
13:48 boffi@debian:~ $ gnuplot

        G N U P L O T
        Version 5.2 patchlevel 6    last modified 2019-01-01 

        Copyright (C) 1986-1993, 1998, 2004, 2007-2018
        Thomas Williams, Colin Kelley and many others

        gnuplot home:     http://www.gnuplot.info
        faq, bugs, etc:   type "help FAQ"
        immediate help:   type "help"  (plot window: hit 'h')

Terminal type is now 'qt'
gnuplot> δ

가장 좋은 대답은 Gnuplot이 유니코드 문자를 허용하도록 만드는 방법을 가르쳐 줄 것이고, 좋은 대답은 Gnuplot이 유니코드 문자를 허용하지 않는 이유를 설명할 것입니다.

13:53 boffi@debian:~ $ env | grep LANG
LANG=C.UTF-8

답변1

Debian의 gnuplot은 gnuplot 명령줄에서 기록을 처리하기 위해 이 라이브러리를 사용하여 구축되었으며 editline실제로 UTF-8을 지원하지 않습니다. configure스크립트에서는 다음과 같이 언급합니다.

  --with-readline=builtin  use the built-in readline
  --with-readline=gnu      use the GNU readline library (default if present)
  --with-readline=bsd      use the NetBSD editline library (NB: does not handle UTF-8!)

이 동작에는 15년 된 버그가 있습니다.#273002및 해당 gnuplot 기능 요청,265화(추가된 내부 구현으로 수정되었기 때문에 폐쇄된 것으로 보입니다 readline.)

Fedora는 내장 기능을 사용하며 readline이 버그의 영향을 받지 않습니다. (그러나 다른 오류도 있습니다. "delta"를 입력한 다음 백스페이스를 시도해 보십시오.)

이 문제를 해결하려면 Debian 패키지를 다시 빌드하세요.

cd /tmp
apt source gnuplot
cd gnuplot-5.0.5+dfsg1
sed -i 's/readline=bsd/readline=builtin/' debian/rules
sudo apt install devscripts equivs
mk-build-deps debian/control
sudo apt install ./gnuplot-build-deps_5.0.5+dfsg1-6+deb9u1_all.deb
mv ./gnuplot-build-deps_5.0.5+dfsg1-6+deb9u1_all.deb ..
dch -n "Use built-in readline."
dch -r ignored
dpkg-buildpackage -us -uc
sudo apt purge gnuplot-build-deps

그러면 상위 디렉터리에 사용할 수 있는 gnuplot 패키지가 생성됩니다 sudo dpkg -i.

관련 정보