This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
This bug was originally marked as duplicate of bug 254204, that is already resolved. This bug is still valid, so this seems to be another bug, but it might be related. Build: NetBeans IDE 8.1 (Build 201510222201) VM: OpenJDK 64-Bit Server VM, 25.65-b01, OpenJDK Runtime Environment, 1.8.0_65-b17 OS: Linux User Comments: Jenselme: If I create a string with some specific UTF-8 characters, this problems occurs. By instance: '''A,, b, ?''' Stacktrace: java.lang.IllegalArgumentException: Cannot create PyString with non-byte value at org.python.core.PyString.<init>(PyString.java:64) at org.python.core.PyString.<init>(PyString.java:70) at org.python.antlr.GrammarActions.extractStrings(GrammarActions.java:477) at org.python.antlr.PythonParser.atom(PythonParser.java:10996) at org.python.antlr.PythonParser.power(PythonParser.java:10363) at org.python.antlr.PythonParser.factor(PythonParser.java:10290)
Created attachment 158094 [details] stacktrace
Did you include "# -*- coding: utf-8 -*-" or similar? Reassigning to Vincent for evaluation.
Created attachment 163126 [details] stacktrace Can reproduce with params={'text': '+-*/\'"[]()??$??<>^??@??=?%????&|?`???????~????{}\\??????'} params={'text': '??????'},
If I include "# -*- coding: utf-8 -*-" at the top of the file, the problem disappears. However, I write Python 3 and this header is not required any more. I'll look into it.
author Julien Enselme <jenselme@netbeans.org> Sun, 04 Dec 2016 13:37:51 +0100 (7 minutes ago) changeset 18392 6ccd27d3f884 parent 18391 044f0cf6fb6b #257531: Prevent errors on files containing non ascii characters without the encoding header