Failed to install java.nio.charset.UnsupportedCharsetException

Hi everyone,
Just tried to run Processing in Python mode for the first time in Windows 7 and get the following error:

Failed to install ‘’: java.nio.charset.UnsupportedCharsetException: cp0.

Looking around it seems that this is something of a common problem across all versions of Processing (including v4). Has there ever been a fix for Windows systems put in place? The only thing I could find was a reference to using preferences.txt to add the following:


but that has no impact on my system as I still get the same error message.

Note that I have also tried to get to work on Linux. While it seems that 3.5.4 works, 4.0 fails.


I’m afraid I haven’t tested Python Mode on Windows 7, so I couldn’t comment. Windows 10 support seems fine.

For now, Python Mode officially supports Processing 3. If you’d like to install it for Processing 4, I compiled this unofficial, experimental version:

But I recommend Processing 3.5.4 for Python Mode.

You can also try py5 as an alternative Python interface for Processing.

I had high hopes that this would work but I’m still getting the same error message.

1 Like

I know this is kind of terrible, but maybe you could try to emulate a Linux box using and this OVA file:

Additional research seems to point the finger at Jython. I tried running Processing from the DOS command line after setting the code page to UTF-8 (chcp 65001) but that made no difference.

I found this observation at enlightening:

Jython’s sys module looks in several places for the console encoding. If nothing tells it the encoding explicitly, it asks Java, here:
jython: 4ed64dc6c895 src/org/python/core/
… Unfortunately, when Windows returns code page zero, Java claims to know that the encoding is cp0. jdk8/jdk8/jdk: 687fd7c7986d src/windows/native/java/io/Console_md.c
.. Note: in Eclipse you need to set ‘-Dpython.console.encoding=UTF-8’ to “Installed JREs”. Not in eclipse.ini.

FYI it was because Processing was relying on Jython that I avoided doing anything with

Does anyone know if Jython config settings (Settings - JythonWiki) can be added to the \modes\PythonMode\ file? I actually did try this but only got the same error message.

Thanks but I’d rather not go down that rabbit hole.

1 Like

Try right now, Processing + CPython 3 FTW! :smiley:

Cool. I’ll give that a try.

My conclusion is that simply will never work on my Windows 7 system since the Jython is self-contained and the code page information is hard coded therein. I have not been able to identify a way to communicate to Jython the necessary code page information. For folks whose system code page setting matches what is defined within the Jython package, this should be a non-issue.

1 Like