-
Notifications
You must be signed in to change notification settings - Fork 31
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
:UTF-8 stream decoding error on maxplot.svg #64
Comments
I haven't been able to replicate this yet, but if it is an error in maxima-jupyter then the problem probably lies in common-lisp-jupyter since that is where the file reading code is located. Just for reference, what OS are you using and what version of maxima and gnupliot do you have? |
I am running maxima and gnuplot on both macOS and Linux. This issue is shown on both platforms. common-lisp-jupyter comes from quicklisp. G N U P L O T Version 5.2 patchlevel 7 |
I was able to reproduce this by using ISO 8859-1 encoding.
Can you try forcing UTF8 with the following?
|
I confirm that And I inspected the generated |
Right now we are just assuming that the file is in UTF8. I'll have to add code to common-lisp-jupyter to inspect the XML header. |
After a little more research, I am not sure that switching the encoding is even possible in Jupyter Notebook. In other words, since SVG files are embedded as text (not as base 64) in the notebook then the SVG encoding has to be the same as the overall notebook file. There doesn't appear to be a way to switch the encoding of the notebook file via the user interface. Basically, only |
When the
maxplot.svg
contains some special characters, UTF-8 stream decoding error is raised. Here is a minimal case to cause this issue:And the error output:
set format y "%h"
will ask gnuplot to use e.g. 1x10^5 with the multiplication signx
being a special character in the svg file.set format y "%G"
won't generate such special character hence there's no error.I'm not sure if this bug should be considered on the gnuplot side or on the jupyter side. I tend to think that jupyter should be able to include/display any reasonable svg.
The text was updated successfully, but these errors were encountered: