Open dklann opened 1 year ago
Unable to reproduce the problem here. This is on CentOS 7, Python 3.6.8.
I see in pypad.py where the JSON is escaped (def __escapeJson()), but it's not clear that this is the right place to address Unicode characters...
None of that is specifically addressing non-Latin1 characters. Strings in Python 3 are Unicode-aware (UTF-8) by default, so non-Latin1 characters should 'just work'.
Huh. It's utterly consistent here. The Cart title with the © symbol causes the crash (per above).
I get that Python3 is Unicode-aware, I'll dig a little deeper to be sure it's actually the Unicode that's causing the issue (maybe there's some other control character in that title).
Thanks for your thoughts Fred!
(maybe there's some other control character in that title)
I actually have seen that come up occasionally, particularly with "older" databases dating from v2.x and earlier. Those systems did brain-damaged things when users attempted to enter non-Latin1 (actually, non-Swedish) characters. The symptom is typically an exception raised by the json.loads()
call in Receiver()
. They can be maddingly elusive to run down.
I was a feckless kid when I did Rivendell v1.x. Character sets?! What are those?? :)
Ha! Right?!?! We all were back in the day! "What else could there be but ASCII and EBCDIC characters?!?!?!"
Just to note: this Rivendell installation is and has always been Rivendell 4 with MariaDB on Ubuntu 22.04 (actually Linux Mint at the moment).
EBCDIC? :scream:
Now there's a deep rabbit hole...
Platform
Ubuntu (Linux Mint 21.1, up to date)
glasscoder_pypad Version
2.0.1-1
Rivendell Version
4.1.0-1
Expected Behavior
A normal metadata update sent to GlassCoder from Rivendell.
Steps to Reproduce
Send metadata containing, for example, the © symbol. pypad_glasscoder.py exits with non-zero status.
Backtrace
Additional Thoughts
I see in pypad.py where the JSON is escaped (
def __escapeJson()
), but it's not clear that this is the right place to address Unicode characters...