Please use the Apache issue tracking system for new NetBeans issues ( !!
Bug 171688 - Python files encoded in utf-8 are not run properly
Python files encoded in utf-8 are not run properly
Status: RESOLVED DUPLICATE of bug 153498
Product: python
Classification: Unclassified
Component: Build
All All
: P3 (vote)
Assigned To: Lou Dasaro
Depends on:
  Show dependency treegraph
Reported: 2009-09-08 10:20 UTC by djib
Modified: 2015-01-02 04:52 UTC (History)
0 users

See Also:
Issue Type: DEFECT


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\", 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:
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 ***

By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2014, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo