Re: a question about Chinese characters in a Python Program

2008-11-09 Thread wmr
fuck -- http://mail.python.org/mailman/listinfo/python-list

Re: a question about Chinese characters in a Python Program

2008-10-21 Thread John Machin
On Oct 22, 11:07 am, Ben Finney <[EMAIL PROTECTED]> wrote: > John Machin <[EMAIL PROTECTED]> writes: > > What is that 0+IBM-127 +IBw-guess+IB0- gibberish in your posting? > > It wasn't in my message as sent to my news server, nor as I read the > message in comp.lang.python. The message was encoded

Re: a question about Chinese characters in a Python Program

2008-10-21 Thread Ben Finney
John Machin <[EMAIL PROTECTED]> writes: > On Oct 21, 11:03 pm, Ben Finney <[EMAIL PROTECTED]> > wrote: > > John Machin <[EMAIL PROTECTED]> writes: > > > I don't understand the point or value of filtering out all byte values > > > greater than 127 > > > > That's only done if the encoding isn't othe

Re: a question about Chinese characters in a Python Program

2008-10-21 Thread John Machin
On Oct 21, 11:03 pm, Ben Finney <[EMAIL PROTECTED]> wrote: > John Machin <[EMAIL PROTECTED]> writes: > > I don't understand the point or value of filtering out all byte values > > greater than 127 > > That's only done if the encoding isn't otherwise specified. In which > case, ASCII is the document

Re: a question about Chinese characters in a Python Program

2008-10-21 Thread Ben Finney
John Machin <[EMAIL PROTECTED]> writes: > I don't understand the point or value of filtering out all byte values > greater than 127 That's only done if the encoding isn't otherwise specified. In which case, ASCII is the documented default encoding. In which case, it *must* be restricted to code p

Re: a question about Chinese characters in a Python Program

2008-10-21 Thread John Machin
On Oct 21, 1:45 am, Paul Boddie <[EMAIL PROTECTED]> wrote: > From the Wikipedia page, it appears that you need to convert GB2312 > values to EUC-CN by a relatively straightforward process, and can then > output the resulting byte sequence in an ASCII compatible way, > provided that you filter out a

Re: a question about Chinese characters in a Python Program

2008-10-20 Thread Ben Finney
est <[EMAIL PROTECTED]> writes: > IMHO it's even better to output wrong encodings rather than halt the > WHOLE damn program by an exception I can't agree with this. The correct thing to do in the face of ambiguity is for Python to refuse to guess. > When debugging encoding problems, the solution

Re: a question about Chinese characters in a Python Program

2008-10-20 Thread Terry Reedy
Liang Chen wrote: Hope you all had a nice weekend. I have a question that I hope someone can help me out. I want to run a Python program that uses Tkinter for the user interface (GUI). The program allows me to type Chinese characters, but neverthelss is unable to show them up on screen. The

Re: a question about Chinese characters in a Python Program

2008-10-20 Thread Benjamin Kaplan
On Mon, Oct 20, 2008 at 12:44 PM, est <[EMAIL PROTECTED]> wrote: > On Oct 20, 11:46 pm, Steven D'Aprano <[EMAIL PROTECTED] > cybersource.com.au> wrote: > > On Mon, 20 Oct 2008 06:30:09 -0700, est wrote: > > > Like I said, str() should NOT throw an exception BY DESIGN, it's a > basic > > > language

Re: a question about Chinese characters in a Python Program

2008-10-20 Thread Lie Ryan
On Sun, 19 Oct 2008 22:32:20 -0700, est wrote: > On Oct 20, 10:48 am, Liang Chen <[EMAIL PROTECTED]> wrote: >> Hope you all had a nice weekend. >> >> I have a question that I hope someone can help me out. I want to run a >> Python program that uses Tkinter for the user interface (GUI). The >> prog

Re: a question about Chinese characters in a Python Program

2008-10-20 Thread est
On Oct 20, 11:46 pm, Steven D'Aprano <[EMAIL PROTECTED] cybersource.com.au> wrote: > On Mon, 20 Oct 2008 06:30:09 -0700, est wrote: > > Like I said, str() should NOT throw an exception BY DESIGN, it's a basic > > language standard. > > int() is also a basic language standard, but it is perfectly ac

Re: a question about Chinese characters in a Python Program

2008-10-20 Thread Steven D'Aprano
On Mon, 20 Oct 2008 06:30:09 -0700, est wrote: > Like I said, str() should NOT throw an exception BY DESIGN, it's a basic > language standard. int() is also a basic language standard, but it is perfectly acceptable for int() to raise an exception if you ask it to convert something into an integ

Re: a question about Chinese characters in a Python Program

2008-10-20 Thread Paul Boddie
On 20 Okt, 15:30, est <[EMAIL PROTECTED]> wrote: > > Thanks for the long comment Paul, but it didn't help massive errors in > Python encoding. > > IMHO it's even better to output wrong encodings rather than halt the > WHOLE damn program by an exception I disagree. Maybe I'll now get round to uploa

Re: a question about Chinese characters in a Python Program

2008-10-20 Thread est
On Oct 20, 6:47 pm, Paul Boddie <[EMAIL PROTECTED]> wrote: > On 20 Okt, 07:32, est <[EMAIL PROTECTED]> wrote: > > > > > Personally I call it a serious bug in python > > Normally I'd entertain the possibility of bugs in Python, but your > reasoning is a bit thin (inhttp://bugs.python.org/issue3648):

Re: a question about Chinese characters in a Python Program

2008-10-20 Thread Paul Boddie
On 20 Okt, 07:32, est <[EMAIL PROTECTED]> wrote: > > Personally I call it a serious bug in python Normally I'd entertain the possibility of bugs in Python, but your reasoning is a bit thin (in http://bugs.python.org/issue3648): "Why cann't Python just define ascii to range(256)" I do accept that

Re: a question about Chinese characters in a Python Program

2008-10-19 Thread oyster
I believe that is the problem with encode/code. you can find more @ http://groups.google.com/group/python-cn -- http://mail.python.org/mailman/listinfo/python-list

Re: a question about Chinese characters in a Python Program

2008-10-19 Thread est
On Oct 20, 10:48 am, Liang Chen <[EMAIL PROTECTED]> wrote: > Hope you all had a nice weekend. > > I have a question that I hope someone can help me out. I want to run a Python > program that uses Tkinter for the user interface (GUI). The program allows me > to type Chinese characters, but neverth