Skip to content

PythonScript fails with a Unicode character in the installed path of Notepad++ #112

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

Open
J-P- opened this issue Nov 27, 2018 · 5 comments
Open
Labels

Comments

@J-P-
Copy link

J-P- commented Nov 27, 2018

It took me some months to solve this issue since I would always revert to a previous installation.

If there is a Unicode character (non-ASCII) in the installed path of Notepad++, NP++ works the same however PythonScript results in an error when a script is executed. In my installation, a bullet (•) failed. The error is reproducible in my environment with at least NP++ versions 6.6 through 7.5.9.

If the character is removed, all goes as expected. Hope this helps.

@sasumner
Copy link

however PythonScript results in an error when a script is executed

What kind of error results from this? Can you be more specific?

@chcg
Copy link
Collaborator

chcg commented Nov 27, 2018

@J-P- Which version of PythonScript is used ? Latest 1.3?
There was a fix with #60 for unicode script names, but that fix probably doesn't cover unicode chars in the N++ path itself.

@chcg chcg added the Bug label Nov 27, 2018
@J-P-
Copy link
Author

J-P- commented Nov 30, 2018

@chcg
PythonScript versions 1.0.8 through to the current 1.3.0 has the problem.

@sasumner
I cannot recall the specific error; i think it was "Unknown Exception." However, anyone can achieve the error by adding any Unicode (non-ASCII) character to the name of the Notepad++ folder. In addition, removing the character will make things normal again.

I cannot add more. I just changed the path for my installation for it to work. Don't have the time or patience to fiddle at this point.

@Ekopalypse
Copy link
Contributor

@chcg
When PythonScript2 will be deprecated, this problem can be closed as it does not occur with the current version of PythonScript.

{3926CC72-E97B-4B96-8BDC-6AB788EC335E}

@chcg
Copy link
Collaborator

chcg commented Jan 4, 2025

PythonScript2 fails at https://github.com/bruderstein/PythonScript/blob/stable_python27/PythonScript/src/PythonConsole.cpp#L102 (maybe related to similar import issues as described in https://bugs.python.org/issue9425. The following PyErr_Print() then terminates python and therefore also N++ (see #301)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants