Opening a UTF-8 w/o BOM file shows strange characters instead of correct acented characters (shows ok in Notepad++). It also doesn't seem comply with the IDE Options sd_UTF8_NoBOM.

26 views
Skip to first unread message

João Matos

unread,
Oct 21, 2017, 8:03:24 AM10/21/17
to PyScripter
Hello,

I'm trying PyScripter 3.0 with Python 3.5.4 32 bits.
If I open a Py3 source file (saved using Notepad++ with UTF-8 w/o BOM) it shows strange characters instead of the correct accented characters. In Notepadd++ it shows ok.
Even if I select UTF-8 (No BOM) in Edit\File format.

PyScripter always assumes Ansi, even though I changed the IDE options to assume the default of sf_UTF8_noBOM.

Best regards,

JM


Kiriakos Vlahos

unread,
Oct 21, 2017, 3:05:15 PM10/21/17
to pyscr...@googlegroups.com
Hi Joao,

Your file needs to include an encoding declaration.

Τhanks for the bug report.

See the PyScripter help topic "Encoded Python Source Files" for details and info on how to fix this problem.

Regards

Kiriakos

--
You received this message because you are subscribed to the Google Groups "PyScripter" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pyscripter+unsubscribe@googlegroups.com.
To post to this group, send email to pyscr...@googlegroups.com.
Visit this group at https://groups.google.com/group/pyscripter.
For more options, visit https://groups.google.com/d/optout.

João Matos

unread,
Oct 21, 2017, 4:59:17 PM10/21/17
to pyscr...@googlegroups.com, Kiriakos Vlahos

Hello,


I tried with and without the utf-8 encoding declaration (PEP8 states that a UTF-8 Python 3 source file should not have an encoding declaration).

The problem occurs both ways.


I forgot to mention that if I open my UTF-8 (No BOM) file created on Notepadd++, both on IDLE and Windows Notepad eveything shows ok. Only on PyScripter it doesn't.


Best regards,


JM

You received this message because you are subscribed to a topic in the Google Groups "PyScripter" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/pyscripter/ZqU6cGqoSb0/unsubscribe.
To unsubscribe from this group and all its topics, send an email to pyscripter+...@googlegroups.com.

PyScripter

unread,
Oct 22, 2017, 4:54:10 PM10/22/17
to PyScripter
Do you mean that PyScripter does not read the file correctly with an encoding declaration?  In that case could you please send me the file so that I can have a look at pyscr...@gmail.com?
To unsubscribe from this group and all its topics, send an email to pyscripter+unsubscribe@googlegroups.com.

João Matos

unread,
Oct 23, 2017, 7:27:46 AM10/23/17
to pyscr...@googlegroups.com, PyScripter
Hello,

Sent you an example source file to your pyscr...@gmail.com email.

Best regards,

JM
To unsubscribe from this group and all its topics, send an email to pyscripter+...@googlegroups.com.

PyScripter

unread,
Oct 23, 2017, 9:47:45 PM10/23/17
to PyScripter
PyScripter 3.0.2 should open your UTF8 file correctly even without BOM and an encoding declaration.

João Matos

unread,
Oct 24, 2017, 3:54:29 AM10/24/17
to pyscr...@googlegroups.com, PyScripter
Hello,

Thanks.

Best regards,

JM



On 24-10-2017 02:47, PyScripter wrote:
PyScripter 3.0.2 should open your UTF8 file correctly even without BOM and an encoding declaration.

Reply all
Reply to author
Forward
0 new messages