CP65001 fails (was re: ...)

wxjmfauth at gmail.com wxjmfauth at gmail.com
Sun Dec 15 09:26:01 CET 2013


Le dimanche 15 décembre 2013 06:07:09 UTC+1, Terry Reedy a écrit :
> On 12/14/2013 9:39 PM, Steven D'Aprano wrote:
> 
> > On Sat, 14 Dec 2013 13:43:41 -0500, Terry Reedy wrote:
> 
> >
> 
> >> This was reported by Victor Stinner as part of
> 
> >> http://bugs.python.org/issue19914
> 
> >> to explain how cp65001 causes behavior like this with Python's
> 
> >> interactive help() function (which more for paging on Windows).
> 
> >>
> 
> >>   >>> help(str)
> 
> >> Not enough memory.
> 
> >
> 
> >
> 
> > Terry, I see you have closed the bug report. I think you were a little
> 
> > hasty.
> 
> 
> 
> I might have been premature, but I was not hasty. I read the SO reports 
> 
> and though about it for an hour or so while looking at other issues. I 
> 
> did not see any use to leaving it open as I did not see any realistic 
> 
> propect of a useful and acceptible patch to Python. The OP himself said 
> 
> that i/o did not work with 65001 and that not using it fixed his issue.
> 
> 
> 
> > The ultimate cause of the bug may be the failure of Window's
> 
> > "more" command when the code-page is set to CP-65001, but that doesn't
> 
> > necessarily imply that Python shouldn't, or can't, do something about it.
> 
> 
> 
> I believe running Python on Windows with cp=65001 falls in the category 
> 
> of "Don't do that". This is based on my experiences and the reported 
> 
> experience of other developers who have tried and failed to make it 
> 
> work, reinforced by the SO thread and a couple of other web pages.
> 
> 
> 
> > The interactive help system already supports different pagers, depending
> 
> > on the environment. I think that it could fall back on a more primitive
> 
> > pager if the preferred one fails.
> 
> 
> 
> Do you know if 'more' actually signals failure?
> 
> Do you know if there are any other situations in which a pager fails?
> 
> 
> 
> > The relevant code is the pager() and
> 
> > getpager() functions in the pydoc module. The patch won't be trivial, but
> 
> > I think it can be done, and I think it should be done. Although possibly
> 
> > for Python 3.5 rather than a bug-fix version. Your thoughts?
> 
> 
> 
> My thought is that if the only situation in which a pager fails is one 
> 
> that one should not use, because other things will also fail, then a 
> 
> patch would not be worth the bother.
> 
> 


If I'm understanding a little bit about coding of
characters, fonts, chars "inputing", I should say
I never really understood how all this stuff is
arranged. (I never found a real explanation too).


There is something, which may be very deeply bound to
the system (kernel ?). As an example, entering a
char with Alt+0XXX always works accordingly to my (the?)
localized windows version. Entering a char with
Alt+XXX (not the missing 0) uses the OEM (bios?)
encoding.

jmf




More information about the Python-list mailing list