Language server fails with UTF-8 filenames

35 views
Skip to first unread message

pjinturin

unread,
Nov 22, 2024, 3:48:56 PM11/22/24
to PyScripter
Hi. I think that the language server fails when the file has a UTF-8 character in the file name or path. To replicate:
- ensure that syntax checking as you type is enabled
- open a new python file with the standard template
- save it as module1.py
- make a syntax error, for example put a space in "pass" at line 13 (so it becomes "pa ss")
- note that the ss becomes underlined and a bug is indicated

Now repeat the same sequence, but save the file as modulè1.py. The red underline is not shown and the bug is not indicated.

If you take the file at the end of the first sequence and save it as modulè1.py the red underline remains. If you then remove the error by deleting the space the red underline disappears but the bug indication on the tab remains. If you then repeat the syntax error no errors are shown.

This occurs on a Windows 10 machine and a Windows 11 machine, both of which have the OS in Italian but I use them with the English language pack. Not sure if this is relevant.

I'm guessing this is a problem with Jedi rather than Pyscripter, but I thought I'd flag it anyway. 
Thanks as always for the best python IDE. The AI integration  is amazing!
Piero



PyScripter

unread,
Nov 22, 2024, 4:12:43 PM11/22/24
to PyScripter
I am not able to reproduce the issue.  See image below with file αβγ.py.  Syntax errors, Go to definition (Ctrl + Click), code hints etc.  all work fine with the latest version of PyScripter and python 3.12.

Screenshot 2024-11-22 231003.png

PyScripter

unread,
Nov 22, 2024, 4:19:53 PM11/22/24
to PyScripter
Actually I was able to reproduce it by using non-greek characters in the filename.

PyScripter

unread,
Nov 22, 2024, 6:50:18 PM11/22/24
to PyScripter
The issue only occurred with characters with order between $10 to $FF.  The French  è is such a character.  It is now fixed in version control and the fix will be available with the next release.

pjinturin

unread,
Nov 23, 2024, 5:10:15 AM11/23/24
to PyScripter
Great, thanks for sorting this out so quickly! I found the issue for a few accented characters and just assumed it was for all UTF-8. Apologies for not doing the extra work to pin it down better.  - Piero
Reply all
Reply to author
Forward
0 new messages