Umlauts in gnuplot command line

2019-05-26 10:16发布

I want to plot surface data in gnuplot (I'm new with gnuplot and found nothing in the docs or via google that worked). It works pretty ok for the beginning with Splot "heightfield.dat".

The problem I have is the path to the file. It contains Umlauts (contains a Ü). I can not change into this folder with cd or plot with a path like this. Of course I just changed the Ü to a U to work, but this is kind of a dirty hack.

The problem is that I can not even type it. When I type Ü it is replaced with \U+FFC3. I tried to set encoding utf8 and others, but nothing worked. It seems only affect the plots and diagrams.

So I want to be able to type umlauts in the gnuplot command line as naturally as possible. Is there a solution to this?

My system is Ubuntu 16.04 and I'm using gnuplot 5.0.

1条回答
2楼-- · 2019-05-26 10:22

The same problem exist on Debian Jessie. It seems that it only appears in the interactive mode, reading commands containing umlauts from a file works as expected.

According to this Ubuntu bug report the reason is that the gnuplot executable is linked against libedit instead of libreadline due to licensing issues. There they also link the reason that it is legal to work around this issue by running gnuplot from the commandline as

LD_PRELOAD=/lib/x86_64-linux-gnu/libreadline.so.6 gnuplot

Depending on how you start the program you might want to put this command into an alias or something similar.

查看更多
登录 后发表回答