Giter Club home page Giter Club logo

Comments (11)

has2k1 avatar has2k1 commented on July 20, 2024

I think it is an issue with your installation. Trying out your unicode string with this notebook gives me unicode in the output.

gnuplot-unicode

from gnuplot_kernel.

N7DR avatar N7DR commented on July 20, 2024

from gnuplot_kernel.

has2k1 avatar has2k1 commented on July 20, 2024

I don't see anything attached!

What version of python is it?

from gnuplot_kernel.

N7DR avatar N7DR commented on July 20, 2024

from gnuplot_kernel.

N7DR avatar N7DR commented on July 20, 2024

from gnuplot_kernel.

has2k1 avatar has2k1 commented on July 20, 2024

Okay, I have seen the same issue at binder.

from gnuplot_kernel.

N7DR avatar N7DR commented on July 20, 2024

from gnuplot_kernel.

has2k1 avatar has2k1 commented on July 20, 2024

That link did work, but I tried it https://mybinder.org/v2/gh/has2k1/gnuplot_kernel/master?filepath=examples and I got the exact garbled output as in https://www.adrive.com/public/yFJpnM/Screenshot_20200510_162329.png.

After some debugging on the containers at binder , I have tracked the failure to pass on unicode to somewhere between the pexpect library (that is part of the requirements) and the gnuplot installation. For my system with the same versions of pexpect and gnuplot, unicode works well. For the binder system, pexpect with sh can pass between themselves unicode strings, while pexpect with gnuplot mess up the unicode handling

A snapshot of the debugging

gnuplot-unicode-debug

Code

# Send some unicode string to the shell and see what it prints
import pexpect
spawn_cmd = '/bin/sh'
child = pexpect.spawnu(spawn_cmd, echo=False)
cmd = 'echo "β(°)"'
child.sendline(cmd)
child.readline()
res = child.before
res
# Send some unicode string to gnuplot and see what it prints
import pexpect
spawn_cmd = '/usr/bin/gnuplot'
#child = pexpect.spawn(spawn_cmd, encoding='utf-8')
child = pexpect.spawnu(spawn_cmd, encoding='utf-8')
cmd = 'print "β(°)"'
child.sendline(cmd)
child.readline()
res = child.buffer.split()[-2]
res

from gnuplot_kernel.

N7DR avatar N7DR commented on July 20, 2024

from gnuplot_kernel.

has2k1 avatar has2k1 commented on July 20, 2024

python3-pexpect is version 4.6.0-1

I have ruled out pexpect and its only dependency ptyprocess by testing the minimum required versions pexpect-4.2.0 and ptyprocess-0.5.0 and my system. With those versions unicode strings are handled correctly.

That effectively rules out the python packages, but not the installed CPython (esp. it's compilation environment) and the general OS environment. With that I am out of moves.

from gnuplot_kernel.

N7DR avatar N7DR commented on July 20, 2024

from gnuplot_kernel.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.