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

IDLE does not work with Unicode #48902

Closed
zzyzx mannequin opened this issue Dec 13, 2008 · 11 comments
Closed

IDLE does not work with Unicode #48902

zzyzx mannequin opened this issue Dec 13, 2008 · 11 comments
Assignees
Labels
topic-IDLE topic-unicode type-bug An unexpected behavior, bug, or error

Comments

@zzyzx
Copy link
Mannequin

zzyzx mannequin commented Dec 13, 2008

BPO 4652
Nosy @ned-deily, @asvetlov

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 = 'https://github.com/asvetlov'
closed_at = <Date 2012-03-21.20:22:40.030>
created_at = <Date 2008-12-13.07:43:48.181>
labels = ['expert-IDLE', 'type-bug', 'expert-unicode']
title = 'IDLE does not work with Unicode'
updated_at = <Date 2012-03-23.15:03:38.632>
user = 'https://bugs.python.org/zzyzx'

bugs.python.org fields:

activity = <Date 2012-03-23.15:03:38.632>
actor = 'weirdink13'
assignee = 'asvetlov'
closed = True
closed_date = <Date 2012-03-21.20:22:40.030>
closer = 'asvetlov'
components = ['IDLE', 'Unicode']
creation = <Date 2008-12-13.07:43:48.181>
creator = 'zzyzx'
dependencies = []
files = []
hgrepos = []
issue_num = 4652
keywords = []
message_count = 11.0
messages = ['77717', '91214', '94884', '156510', '156511', '156512', '156514', '156515', '156516', '156517', '156667']
nosy_count = 6.0
nosy_names = ['gpolo', 'ned.deily', 'zzyzx', 'asvetlov', 'jchelary', 'weirdink13']
pr_nums = []
priority = 'normal'
resolution = 'works for me'
stage = 'resolved'
status = 'closed'
superseder = None
type = 'behavior'
url = 'https://bugs.python.org/issue4652'
versions = ['Python 3.1']

@zzyzx
Copy link
Mannequin Author

zzyzx mannequin commented Dec 13, 2008

I have installed python 3.0 on Ubuntu 8.10 yesterday and played around
with the new unicode features and had no problems with Japanese
characters(both in interactive and script mode). However, after
rebooting, IDLE will no longer let me input any Japanese characters.
(I have it set to UFT-8, if it makes any difference anymore)

The terminal works fine. It lets me input Japanese and runs commands
correctly.

So I used gedit and saved a simple print("Hello(in Japanese chars)"),
and run it with IDLE 3.0 but I get a blank line >>>.

(Can I also make sure that I'm opening IDLE correctly? This is how I do it:
1)Open Terminal
2)~$ Python.3.0
3)>>> input idlelib.idle 

Thank You in advance.

@zzyzx zzyzx mannequin added performance Performance or resource usage topic-IDLE labels Dec 13, 2008
@devdanzin devdanzin mannequin added topic-unicode type-bug An unexpected behavior, bug, or error and removed performance Performance or resource usage labels Apr 26, 2009
@gpolo
Copy link
Mannequin

gpolo mannequin commented Aug 3, 2009

I can't seem to reproduce that, maybe it could be a tk issue ?

Can you try writing anything (that doesn't work on IDLE) on a
tkinter.Text widget to see if it shows there ? You could use this code
below:

from tkinter import Text

text = Text()
print(text.tk.call('info', 'patchlevel'))
text.focus_set()
text.pack()
text.mainloop()

@jchelary
Copy link
Mannequin

jchelary mannequin commented Nov 4, 2009

I've installed Python 3.1.1 on OSX today.
1) When I use the Japanese input from OSX, IDLE interprets any character 
I attempt to type as a space.
2) When I paste a Japanese string from a different place, it is 
correctly handled. For ex:
>>> print('ここ')
ここ
>>> 

While on Python 2.5's IDLE I had:
>>> print('ここ')
Unsupported characters in input

>>

by default.

In any case, IDLE 3.1.1 does not respect the input source and that makes
it impossible to directly type Japanese (if not other double byte
character based languages).

Note: IDLE respect OSX dead keys and I can correctly use "Alt+c" to
input "ç".

@weirdink13
Copy link
Mannequin

weirdink13 mannequin commented Mar 21, 2012

I opened my IDLE (v. 3.2.2 windows xp) and pasted in
print('ここ')
it printed
ここ
just fine.

@weirdink13
Copy link
Mannequin

weirdink13 mannequin commented Mar 21, 2012

alt-c does nothing for me

@asvetlov
Copy link
Contributor

For now unicode BMP has full support in TK while non-BMP characters doesn't works.

'こ' character is BMP symbol:
>>> hex(ord(''))
'0x3053'
which is lesser than non-BMP space (starting from 0x10000).

I have no idea why alt-c doesn't converted to 'ç' (also BMP by the way) and why it has been processed by Helary's IDLE. I have no any Mac box nearby to check.
Sure, 'alt-c' is minor problem if this is problem at all.

@asvetlov
Copy link
Contributor

I close this issue because:

  • current 3.2 and upcoming 3.3 support Japanese characters very well.
  • there are problems with non-BMP characters not supported currently but it's another issue.

See progress of bpo-14200 and others for non-BMP.

@asvetlov asvetlov self-assigned this Mar 21, 2012
@weirdink13
Copy link
Mannequin

weirdink13 mannequin commented Mar 21, 2012

I would say that alt-c is not a problem at all, but, some people might use 'ç' more that me, (I never have used 'ç' spesificaly)

@ned-deily
Copy link
Member

To add to the other comments, problems with input methods using Python 3 and Tkinter or IDLE are usually platform-specific issues with the implementation of Tk. In particular, the issue Jean-Christophe reported with Python 3.1.1 was very likely due to its use of the old Tk 8.4 (at least with the python.org installer). Current versions of Python 3.2.x for OS X 10.6+ link with the newer Tk 8.5, the very latest releases of which by ActiveState contain important fixes for input methods using composite characters (http://www.python.org/download/mac/tcltk/ has the most up-to-date information). Also, note to the original poster, you either made a typo in the bug report ("UFT-8" - it should be "UTF-8") or, if you actually tried that locale, it might explain why you had problems. If someone can reproduce a problem with a current Python 3.2.x or later, please re-open with details.

@asvetlov
Copy link
Contributor

Daniel Swanson, maybe my msg156512 was not obvious.
You can use 'ç' without any problem in IDLE — it is BMP character.

See http://en.wikipedia.org/wiki/Mapping_of_Unicode_characters
for details.
tkinter has full support for 'Basic Multilingual Plane' while last planes still has a problems.

@weirdink13
Copy link
Mannequin

weirdink13 mannequin commented Mar 23, 2012

ok

@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-IDLE topic-unicode type-bug An unexpected behavior, bug, or error
Projects
None yet
Development

No branches or pull requests

2 participants