Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Python > Issue 1602, cp65001, powershell and python3 crash

Reply
Thread Tools

Issue 1602, cp65001, powershell and python3 crash

 
 
jmfauth
Guest
Posts: n/a
 
      01-16-2011
After having read the discussion about the issue 1602,
http://bugs.python.org/issue1602, I came to the idea
to test Python with the PowerShell. I thought, it
could help and manage "unicode" better than the
std "dosbox" does

My experience with PowerShell is closed to zero, so
take the following as a flat raw information.

1) Setup the coding in PowerShell (font: Consolas)

PS D:\jm> $OutputEncoding


IsSingleByte : True
BodyName : us-ascii
EncodingName : US-ASCII
HeaderName : us-ascii
WebName : us-ascii
WindowsCodePage : 1252
IsBrowserDisplay : False
IsBrowserSave : False
IsMailNewsDisplay : True
IsMailNewsSave : True
EncoderFallback : System.Text.EncoderReplacementFallback
DecoderFallback : System.Text.DecoderReplacementFallback
IsReadOnly : True
CodePage : 20127

PS D:\jm> chcp 65001
Page de codes active*: 65001

PS D:\jm> $OutputEncoding = [Console]::OutputEncoding
PS D:\jm> $OutputEncoding


BodyName : utf-8
EncodingName : Unicode (UTF-
HeaderName : utf-8
WebName : utf-8
WindowsCodePage : 1200
IsBrowserDisplay : True
IsBrowserSave : True
IsMailNewsDisplay : True
IsMailNewsSave : True
IsSingleByte : False
EncoderFallback : System.Text.EncoderReplacementFallback
DecoderFallback : System.Text.DecoderReplacementFallback
IsReadOnly : True
CodePage : 65001


So far, so good. It seems I can enter and display "unicode
characters" (as opposed to cp850).

PS D:\jm> echo 'abc逜Üß'
abc逜Üß
PS D:\jm> chcp
Page de codes active*: 65001
PS D:\jm>

2) Python test

PS D:\jm> c:\python31\python.exe
Fatal Python error: Py_Initialize: can't initialize sys standard
streams
LookupError: unknown encoding: cp65001

This application has requested the Runtime to terminate it in an
unusual way.
Please contact the application's support team for more information.
PS D:\jm>

Obviously and expectedly Python does not recognize cp65001.
That's not the problem.

The main concern is, Python crashes with the usual msgbox,
"python.exe has stopped working ..." .

win7 pro (32 bits), Swiss French setup, cp850/cp1252, Python 3.1.2 .

Take this a raw information and do not ask me what's happen
behind the scene.

Last minute info:
Python 3.2.rc1: same behaviour.

jmf
 
Reply With Quote
 
 
 
 
Terry Reedy
Guest
Posts: n/a
 
      01-16-2011
On 1/16/2011 4:22 AM, jmfauth wrote:
> After having read the discussion about the issue 1602,
> http://bugs.python.org/issue1602, I came to the idea
> to test Python with the PowerShell. I thought, it
> could help and manage "unicode" better than the
> std "dosbox" does
>
> My experience with PowerShell is closed to zero, so
> take the following as a flat raw information.
>
> 1) Setup the coding in PowerShell (font: Consolas)
>
> PS D:\jm> $OutputEncoding
>
>
> IsSingleByte : True
> BodyName : us-ascii
> EncodingName : US-ASCII
> HeaderName : us-ascii
> WebName : us-ascii
> WindowsCodePage : 1252
> IsBrowserDisplay : False
> IsBrowserSave : False
> IsMailNewsDisplay : True
> IsMailNewsSave : True
> EncoderFallback : System.Text.EncoderReplacementFallback
> DecoderFallback : System.Text.DecoderReplacementFallback
> IsReadOnly : True
> CodePage : 20127
>
> PS D:\jm> chcp 65001
> Page de codes active : 65001
>
> PS D:\jm> $OutputEncoding = [Console]::OutputEncoding
> PS D:\jm> $OutputEncoding
>
>
> BodyName : utf-8
> EncodingName : Unicode (UTF-
> HeaderName : utf-8
> WebName : utf-8
> WindowsCodePage : 1200
> IsBrowserDisplay : True
> IsBrowserSave : True
> IsMailNewsDisplay : True
> IsMailNewsSave : True
> IsSingleByte : False
> EncoderFallback : System.Text.EncoderReplacementFallback
> DecoderFallback : System.Text.DecoderReplacementFallback
> IsReadOnly : True
> CodePage : 65001
>
>
> So far, so good. It seems I can enter and display "unicode
> characters" (as opposed to cp850).
>
> PS D:\jm> echo 'abc逜Üß'
> abc逜Üß
> PS D:\jm> chcp
> Page de codes active : 65001
> PS D:\jm>
>
> 2) Python test
>
> PS D:\jm> c:\python31\python.exe
> Fatal Python error: Py_Initialize: can't initialize sys standard
> streams
> LookupError: unknown encoding: cp65001
>
> This application has requested the Runtime to terminate it in an
> unusual way.
> Please contact the application's support team for more information.
> PS D:\jm>
>
> Obviously and expectedly Python does not recognize cp65001.
> That's not the problem.
>
> The main concern is, Python crashes with the usual msgbox,
> "python.exe has stopped working ..." .
>
> win7 pro (32 bits), Swiss French setup, cp850/cp1252, Python 3.1.2 .
>
> Take this a raw information and do not ask me what's happen
> behind the scene.
>
> Last minute info:
> Python 3.2.rc1: same behaviour.


Could you add this report, slightly condensed, to the issue?


--
Terry Jan Reedy


 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Re: is the same betweent python3 and python3.2? Andrew Berg Python 0 06-16-2012 11:11 AM
powershell and ri Catsquotl Ruby 1 02-27-2011 08:12 AM
Executive Chat – Windows PowerShell, Internet Information Services (IIS) 7.0 and Windows Server “Longhorn” Darrell Gorter[MSFT] Windows 64bit 0 11-17-2006 01:26 AM
Python and Windows new Powershell BartlebyScrivener Python 1 05-02-2006 07:53 PM
Powershell 3.01 Alt-Ctrl-Del Computer Support 0 10-13-2005 05:10 AM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57