Umlauts in gnuplot command line

拜拜、爱过 提交于 2019-12-07 22:58:31

问题


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:


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.



来源:https://stackoverflow.com/questions/40346179/umlauts-in-gnuplot-command-line

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!