Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

print unicode string error in win8 cmd console #58378

Closed
nkxyz mannequin opened this issue Mar 2, 2012 · 7 comments
Closed

print unicode string error in win8 cmd console #58378

nkxyz mannequin opened this issue Mar 2, 2012 · 7 comments
Labels
topic-IO type-bug An unexpected behavior, bug, or error

Comments

@nkxyz
Copy link
Mannequin

nkxyz mannequin commented Mar 2, 2012

BPO 14170
Nosy @loewis, @vstinner, @giampaolo, @tjguk, @briancurtin

Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

Show more details

GitHub fields:

assignee = None
closed_at = <Date 2021-10-22.21:57:00.768>
created_at = <Date 2012-03-02.03:43:30.965>
labels = ['type-bug', 'expert-IO']
title = 'print unicode string error in win8 cmd console'
updated_at = <Date 2021-10-22.21:57:00.766>
user = 'https://bugs.python.org/nkxyz'

bugs.python.org fields:

activity = <Date 2021-10-22.21:57:00.766>
actor = 'tim.golden'
assignee = 'none'
closed = True
closed_date = <Date 2021-10-22.21:57:00.768>
closer = 'tim.golden'
components = ['IO']
creation = <Date 2012-03-02.03:43:30.965>
creator = 'nkxyz'
dependencies = []
files = []
hgrepos = []
issue_num = 14170
keywords = []
message_count = 7.0
messages = ['154724', '154740', '154770', '154958', '154962', '154975', '404832']
nosy_count = 6.0
nosy_names = ['loewis', 'vstinner', 'giampaolo.rodola', 'tim.golden', 'brian.curtin', 'nkxyz']
pr_nums = []
priority = 'normal'
resolution = 'out of date'
stage = 'resolved'
status = 'closed'
superseder = None
type = 'behavior'
url = 'https://bugs.python.org/issue14170'
versions = ['Python 2.7']

@nkxyz
Copy link
Mannequin Author

nkxyz mannequin commented Mar 2, 2012

print u'测试中文'

睺raceback (most recent call last):
File "C:\Users\__test.py", line 96, in <module>
sys.exit(main())
File "C:\Users\__test.py", line 84, in main
print u'娴嬭瘯涓枃'
IOError: [Errno 28] No space left on device

the unicode must start with a ascii char, then print can works
like this: "print u' 测试中文'"

@nkxyz nkxyz mannequin added topic-IO type-bug An unexpected behavior, bug, or error labels Mar 2, 2012
@nkxyz nkxyz mannequin changed the title print unicode string error in cmd console print unicode string error in win8 cmd console Mar 2, 2012
@loewis
Copy link
Mannequin

loewis mannequin commented Mar 2, 2012

What is the code page of your console (try: "chcp").

@vstinner
Copy link
Member

vstinner commented Mar 2, 2012

It looks like a duplicate of the issue bpo-11395 which has been fixed in
Python 3.2.1, but not backported to Python 2.7. Can you please try
your program with Python 3.2.1? And maybe also attach the whole test
script?

@loewis
Copy link
Mannequin

loewis mannequin commented Mar 5, 2012

Victor: why do you think this is a duplicate of bpo-11395? That issue deals with long output strings, which doesn't seem to be the case here.

@vstinner
Copy link
Member

vstinner commented Mar 5, 2012

Victor: why do you think this is a duplicate of bpo-11395? That issue deals with long output strings, which doesn't seem to be the case here.

IOError('[Errno 28] No space left on device') was exactly the bpo-11395
error message. Without the full test script, i cannot be sure that
it's a duplicate. "C:\Users\__test.py, line 96": it looks like the
program has ~100 lines and so may write something else to the console.
There are buffers in TextIOWrapper, BufferedWriter and the Windows
console itself. By the way, Python maps the Windows error
ERROR_DISK_FULL (112) to ENOSPC (28).

It's maybe something completly different.

@loewis
Copy link
Mannequin

loewis mannequin commented Mar 5, 2012

IOError('[Errno 28] No space left on device') was exactly the bpo-11395
error message.

I read that report differently:

IOError: [Errno 12] Not enough space

ENOMEM != ENOSPC

@tjguk
Copy link
Member

tjguk commented Oct 22, 2021

Closing this as out-of-date. The original bug was reported against 2.7 and Win8, both of which are either end-of-life now.

No follow up in 9 years and I'm quite certain that modern Pythons handle all manner of Unicode chars on the console.

@tjguk tjguk closed this as completed Oct 22, 2021
@ezio-melotti ezio-melotti transferred this issue from another repository Apr 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
topic-IO type-bug An unexpected behavior, bug, or error
Projects
None yet
Development

No branches or pull requests

2 participants