Issue6088
Created on 2009-05-22 15:52 by leeon, last changed 2010-10-21 13:37 by georg.brandl. This issue is now closed.
| Messages (4) | |||
|---|---|---|---|
| msg88195 - (view) | Author: Leeon (leeon) | Date: 2009-05-22 15:52 | |
Python3.0.1 is not available when system locale is zh_TW.eucTW
Expected result: python3.0 interpreter should works fine.
Actual result: python3.0 interpreter can not execute any statement or
ran python program.
Steps to reproduce this bug:
1. Login HP-UX with a locale 'zh_TW.eucTW'.
2. Install ActivePython-3.0.1.1-hpux11.00-parisc.tar.gz on a HP-UX 11.11
machine.
3. Start the python3.0 interpreter.
4. Try some python statements like following, there was not any reaction:
import locale
locale.getlocale()
help()
exit()
5. Try to run a python program like following, but it was not run.
python3.0 foo.py
Notes:
1. This error does not occur when the system locale is 'zh_TW.big5'.
2. This error was also found on linux build.
|
|||
| msg88197 - (view) | Author: R. David Murray (r.david.murray) * ![]() |
Date: 2009-05-22 16:12 | |
I can't reproduce this on trunk (or 3.0 maint) on Gentoo Linux:
~/python/py3k>./python
Python 3.1b1+ (py3k:72816, May 21 2009, 22:01:55)
[GCC 4.3.3] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import locale
[50411 refs]
>>> locale.getlocale()
('zh_TW', 'eucTW')
[50423 refs]
>>> help()
Welcome to Python 3.1! This is the online help utility.
[...]
>>> locale.setlocale(locale.LC_ALL, '')
'zh_TW.eucTW'
[50462 refs]
>>> help()
Welcome to Python 3.1! This is the online help utility.
[...]
Leon: you say ActivePython, which is a vendor distribution. I think you
should report this bug to them, unless you can reproduce it using the
python.org python.
|
|||
| msg88301 - (view) | Author: Leeon (leeon) | Date: 2009-05-25 04:20 | |
Hello David, Thanks for your quick response! I just downloaded Python3.0.1 source code and compiled it on my Debian 5.0 Linux using following commands: root@li-le01-d5:~# ./configure root@li-le01-d5:~# make root@li-le01-d5:~# make altinstall Then I try Python in interactive mod and found the problem. On my system, there is not any output and error message in python3.0 console when I try to execute some statments. See following screen reaction: root@li-le01-d5:~# python3.0 Python 3.0.1 (r301:69556, May 26 2009, 19:48:24) [GCC 4.3.2] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> import locale >>> loacle.getlocale() >>> help() >>> exit() >>> Then I try to execute a script file hello.py. My script contains only one python statement: print('Hello World!') On my system, there is not any output and error message also when I run "python3.0 hello.py". root@li-le01-d5:~# locale LANG=zh_TW.EUC-TW LC_CTYPE="zh_TW.EUC-TW" LC_NUMERIC="zh_TW.EUC-TW" LC_TIME="zh_TW.EUC-TW" LC_COLLATE="zh_TW.EUC-TW" LC_MONETARY="zh_TW.EUC-TW" LC_MESSAGES="zh_TW.EUC-TW" LC_PAPER="zh_TW.EUC-TW" LC_NAME="zh_TW.EUC-TW" LC_ADDRESS="zh_TW.EUC-TW" LC_TELEPHONE="zh_TW.EUC-TW" LC_MEASUREMENT="zh_TW.EUC-TW" LC_IDENTIFICATION="zh_TW.EUC-TW" LC_ALL= root@li-le01-d5:~# /usr/local/bin/python3.0 hello.py root@li-le01-d5:~# Then I witch to zh_TW.utf8 and try it again. root@li-le01-d5:~# LANG=zh_TW.utf8 root@li-le01-d5:~# locale LANG=zh_TW.utf8 LC_CTYPE="zh_TW.utf8" LC_NUMERIC="zh_TW.utf8" LC_TIME="zh_TW.utf8" LC_COLLATE="zh_TW.utf8" LC_MONETARY="zh_TW.utf8" LC_MESSAGES="zh_TW.utf8" LC_PAPER="zh_TW.utf8" LC_NAME="zh_TW.utf8" LC_ADDRESS="zh_TW.utf8" LC_TELEPHONE="zh_TW.utf8" LC_MEASUREMENT="zh_TW.utf8" LC_IDENTIFICATION="zh_TW.utf8" LC_ALL= root@li-le01-d5:~# /usr/local/bin/python3.0 hello.py Hello world! root@li-le01-d5:~# This problem was also occurs when I try the same steps on HP-UX 11.11 and SUSE sles10. Would you please kindly to tell me if I missed some steps when I compile from source or some env variables from shell or some others. The problem was strange and made me crazy. I am very appreciated if you can tell me how to resolve it. Thank you very much. Leeon |
|||
| msg119292 - (view) | Author: Georg Brandl (georg.brandl) * ![]() |
Date: 2010-10-21 13:37 | |
This is very probably resolved in 3.1 or 3.2, where lots of environment vs Unicode bugs were fixed. |
|||
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2010-10-21 13:37:35 | georg.brandl | set | status: open -> closed nosy: + georg.brandl messages: + msg119292 |
| 2009-05-25 04:20:58 | leeon | set | status: pending -> open messages: + msg88301 |
| 2009-05-22 16:12:43 | r.david.murray | set | status: open -> pending nosy: + r.david.murray messages: + msg88197 resolution: works for me priority: normal type: crash -> behavior stage: committed/rejected |
| 2009-05-22 15:52:23 | leeon | create | |
