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.

Bug 171688

Summary: Python files encoded in utf-8 are not run properly
Product: python Reporter: djib <djib>
Component: BuildAssignee: Lou Dasaro <mr_lou_d>
Status: RESOLVED DUPLICATE    
Severity: blocker    
Priority: P3    
Version: 8.0.2   
Hardware: All   
OS: All   
Issue Type: DEFECT Exception Reporter:

Description djib 2009-09-08 10:20:13 UTC
Python files encoded in utf-8 are not run properly.

Steps to reproduce:
1. Create a new python project.
2. In the project properties, set encoding to "UTF8".
3. Create an new file with the following content:

# -*- coding: UTF-8 -*-
print u"à"

4. Run the project.  You get the following error:
Traceback (most recent call last):
  File "[…]\src\test.py", line 2, in <module>
    print u"à"
UnicodeEncodeError: 'ascii' codec can't encode character u'\xe0' in position 0: ordinal not in range(128)

5. Run the file in a terminal, it works:
>python test.py
à
>
Comment 1 huam 2014-03-20 14:51:05 UTC
I also have the problem.
With the IDLE there is no problem.
Comment 2 MrZogs 2014-09-19 10:05:49 UTC
I have the same problem,but i have the netbeans 8.
Comment 3 Lou Dasaro 2015-01-02 04:52:12 UTC

*** This bug has been marked as a duplicate of bug 153498 ***