Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #65197 > unrolled thread

Re: Python shell wont open idle or an exisiting py file

Started byTerry Reedy <tjreedy@udel.edu>
First post2014-02-01 00:46 -0500
Last post2014-02-01 00:46 -0500
Articles 1 — 1 participant

Back to article view | Back to comp.lang.python

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: Python shell wont open idle or an exisiting py file Terry Reedy <tjreedy@udel.edu> - 2014-02-01 00:46 -0500

#65197 — Re: Python shell wont open idle or an exisiting py file

FromTerry Reedy <tjreedy@udel.edu>
Date2014-02-01 00:46 -0500
SubjectRe: Python shell wont open idle or an exisiting py file
Message-ID<mailman.6268.1391233806.18130.python-list@python.org>
On 1/31/2014 10:36 PM, Chris Angelico wrote:
> On Sat, Feb 1, 2014 at 1:54 PM, MRAB <python@mrabarnett.plus.com> wrote:
>> I think that some years ago I heard about a variation on UTF-8
>> (Microsoft?) where codepoint U+0000 is encoded as 0xC0 0x80 so that the
>> null byte can be used as the string terminator.
>>
>> I had a look on Wikipedia found this:
>>
>> http://en.wikipedia.org/wiki/Null-terminated_string
>
> Yeah, it's a common abuse of UTF-8. It's a violation of spec, but an
> understandable one. However, I don't understand why the first part -
> why should \0 become U+0000 but (presumably) the \a later on
> (...cs\accel...) doesn't become U+0007, etc?

Because only  \0 has a special meaning in a C string, and Tk is written 
in C and uses C strings.

-- 
Terry Jan Reedy

[toc] | [standalone]


Back to top | Article view | comp.lang.python


csiph-web