This issue tracker has been migrated to GitHub ,
and is currently read-only.
For more information,
see the GitHub FAQs in the Python's Developer Guide.
Created on 2013年11月16日 14:53 by THRlWiTi, last changed 2022年04月11日 14:57 by admin. This issue is now closed.
| Messages (6) | |||
|---|---|---|---|
| msg203047 - (view) | Author: Thrlwiti (THRlWiTi) * | Date: 2013年11月16日 14:53 | |
>>> s = 'ی' Unsupported characters in input I'm using windows 8 and Python 2.7.6. The same line works perfectly if I save it in a module with encoding set to UTF-8; but it's really annoying that I can't test my code directly in IDLE. |
|||
| msg203058 - (view) | Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) | Date: 2013年11月16日 16:13 | |
This is a duplicate of issue15809. |
|||
| msg218569 - (view) | Author: Terry J. Reedy (terry.reedy) * (Python committer) | Date: 2014年05月14日 19:39 | |
For the benefit of anyone finding this in a search, I fixed the title to match the actual request. UTF-8 *is* already the default encoding in 3.x, and upgrading to 3.x if at all possible is the best solution to unicode problems. |
|||
| msg242224 - (view) | Author: Thrlwiti (THRlWiTi) * | Date: 2015年04月29日 13:59 | |
Although in Python 3 IDLE can indeed print UTF-8 characters. But still sys.stdout.encoding == locale.getpreferredencoding() != 'utf-8'. >>> sys.stdout.encoding 'cp1256' Shouldn't it be 'utf-8'? |
|||
| msg242225 - (view) | Author: Stéphane Wirtel (matrixise) * (Python committer) | Date: 2015年04月29日 14:04 | |
On OS X and with IDLE 3, I get utf-8 with sys.stdout.encoding, not sure, but I think you have to check the default encoding on Windows. What’s the result if you execute: python3 -c 'import sys; print(sys.getdefaultencoding())' |
|||
| msg242229 - (view) | Author: Thrlwiti (THRlWiTi) * | Date: 2015年04月29日 14:35 | |
On cmd and powershell: >python -c "import sys; print(sys.getdefaultencoding());" utf-8 >python -c "import sys; print(sys.stdout.encoding);" cp720 In IDLE: >>> import sys; print(sys.getdefaultencoding()); utf-8 >>> sys.stdout.encoding 'cp1256' |
|||
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2022年04月11日 14:57:53 | admin | set | github: 63824 |
| 2015年04月29日 14:35:06 | THRlWiTi | set | messages: + msg242229 |
| 2015年04月29日 14:04:21 | matrixise | set | nosy:
+ matrixise messages: + msg242225 |
| 2015年04月29日 13:59:04 | THRlWiTi | set | messages: + msg242224 |
| 2014年05月14日 19:39:55 | terry.reedy | set | nosy:
+ terry.reedy messages: + msg218569 title: IDLE should use UTF-8 as it's default encoding -> IDLE 2.7 should use UTF-8 as it's default encoding |
| 2013年11月16日 16:13:21 | serhiy.storchaka | set | status: open -> closed superseder: 2.7 IDLE console uses incorrect encoding. nosy: + serhiy.storchaka messages: + msg203058 type: behavior resolution: duplicate stage: resolved |
| 2013年11月16日 14:53:51 | THRlWiTi | create | |