How to fix UnsupportedCharsetException in Eclipse Kepler / Luna using Jython / PyDev?

Code example:

from java.lang import System

if __name__ == '__main__':
    [System.out.print(x) for x in "Python-powered Java Hello World from within a List-Comprehension."]

Annoying conclusion:

console: Failed to install 'org.python.util.JLineConsole': java.nio.charset.UnsupportedCharsetException: cp0.
console: Failed to install 'org.python.util.JLineConsole': java.nio.charset.UnsupportedCharsetException: cp0.
Python-powered Java Hello World from within a List-Comprehension.

I tried the solution described here and here . Both solutions failed (I added the argument -Dpython.console.encoding = UTF-8 for the JVM and PyDev interactive console).

There is another question about it here 4 months ago , and no one answered it. So how can I fix this?

EDIT: I just installed the new Eclipse Luna, installed PyDev with Jython, and the same thing happens.

+4
source share
7 answers

I fixed the problem by lowering Jython from 2.7.0 to 2.5.4rc1. This seems to be a Python 3.4 issue with Jython 2.7.0.

, Jython 2.5.4rc1 - Standalone Jar Jython Eclipse Luna, : Window → → PyDev → → Jython Interpreter → Jython → ( .jar).

, Jython Jython (, Python 3.4, Eclipse. Kepler Luna, . Python 2.7, ).

.

+6

, , (http://bugs.jython.org/issue2222), -Dpython.console.encoding = UTF-8 VM . , Jython .

Jython 2.7.0 Eclipse Luna PyDev Windows 7.

+14

, , PyDev ( Jython)... ( , ).

, , , , Jython: http://bugs.jython.org/msg8448

+2

Python 3.5.2 Neon eclipse .

-Dpython.console.encoding = UTF-8 , 826366. .

+2

"-Dpython.console.encoding = UTF-8" Run Configurations → VM.

+1

, , , UTF-8 eclipse VM, .

 -Dpython.console.encoding=UTF-8
0

, -Dpython.console.encoding = UTF-8

0

All Articles