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 - Python files encoded in utf-8 are not run properly
Summary: Python files encoded in utf-8 are not run properly
Status: RESOLVED DUPLICATE of bug 153498
Alias: None
Product: python
Classification: Unclassified
Component: Build (show other bugs)
Version: 8.0.2
Hardware: All All
: P3 blocker (vote)
Assignee: Lou Dasaro
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-09-08 10:20 UTC by djib
Modified: 2015-01-02 04:52 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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 ***