python ignores encoding definition

Bug #516064 reported by Hiro Protagonist
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
python-defaults (Ubuntu)
Invalid
Undecided
Unassigned

Bug Description

Binary package hint: python

1) Ubuntu 9.10
2) python 2.6.4-0ubuntu1

the python script i run is:

#!/usr/bin/python
# -*- coding: utf-8 -*-
import sys
print sys.getdefaultencoding()

just these four lines.

3) i expect that this prints out the encoding given in the second line of the script; 'utf-8' in this case as defined in
http://www.python.org/dev/peps/pep-0263/ .
(running this script in eclipse using pydev really shows this behaviour).

4) the result of the script when run in bash is: 'ascii'. no matter what encoding i specify in the second line.

Tags: python
Revision history for this message
Matthias Klose (doko) wrote :

closing as invalid. the encoding of the source file doesn't correspond to the default encoding.

Changed in python-defaults (Ubuntu):
status: New → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.