Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Python > Does Python mess with the (unicode) code page?

Reply
Thread Tools

Does Python mess with the (unicode) code page?

 
 
Roy Smith
Guest
Posts: n/a
 
      12-03-2009
We've got a windows executable which used to get run out of a shell script
(Cygwin bash) and is now being run with subprocess.Popen(). The windows
app is misbehaving. To make a long story short, the guy who wrote the code
in question says,

> it's all based on the return values of the WinAPI calls GetACP and GetOEMCP
> [...] so maybe Python is doing something like setting the active code page
> and OEM code page prior to the point when they "exec" stuff?


Does Python do these things? I'm using Python 2.5.1.
 
Reply With Quote
 
 
 
 
Gabriel Genellina
Guest
Posts: n/a
 
      12-08-2009
En Thu, 03 Dec 2009 15:38:28 -0300, Roy Smith <(E-Mail Removed)> escribió:

> We've got a windows executable which used to get run out of a shell
> script
> (Cygwin bash) and is now being run with subprocess.Popen(). The windows
> app is misbehaving. To make a long story short, the guy who wrote the
> code
> in question says,
>
>> it's all based on the return values of the WinAPI calls GetACP and
>> GetOEMCP
>> [...] so maybe Python is doing something like setting the active code
>> page
>> and OEM code page prior to the point when they "exec" stuff?

>
> Does Python do these things? I'm using Python 2.5.1.


Not that I know of (also, I don't know of any way to programmatically
alter GetACP and GetOEMCP, they're global system settings).

A console application should use the console functions GetConsoleCP and
GetConsoleOutputCP; Python itself calls them to derive sys.stdin.encoding
and sys.stdout.encoding respectively, but only queries the value, never
sets it. GetConsoleCP isn't necesarily the same as GetOEMCP.

--
Gabriel Genellina

 
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
Does Python mess with CRLFs? Gilles Ganault Python 4 11-12-2008 06:52 PM
first time use of swig, python and c++ .. it's a mess ... pleaseadvice Eric von Horst Python 3 02-28-2008 07:42 PM
Wireless Networking a Mess =?Utf-8?B?Q2VsZWJyaXR5WDIz?= Wireless Networking 3 05-17-2005 03:35 PM
Does FrontPage mess up JSP code? Mickey Segal Java 8 08-03-2004 06:55 PM
PIX 515, DMZ, VPN, what a mess. Need Help. Eddie Cisco 9 06-20-2004 08:22 PM



Advertisments