<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=iso-8859-1">
<META content="MSHTML 5.50.4134.100" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV><FONT face=Arial size=2>Hello.</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>Sorry if I seem not to be able to understand this. 
I think I need some more help here. Let me first express my question, and 
then</FONT></DIV>
<DIV><FONT face=Arial size=2>some hints I have gotten from the group, to make 
sure I understand anything at all:</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>Question:</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>    - Is it possible to write Python 
scripts under Pythonwin using non-ascii characters (latin-1 or cp1252 in my 
case) in comments, docstrings, etc?</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>What I know/have read/guess, I would appreciate 
comments on these particular issues also:</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>- It is not the same to have non-ascii characters 
in the comments, etc (this depends on the file encoding) than output a certain 
encoding (which I can get using the appropriate encode).</FONT></DIV>
<DIV><FONT face=Arial size=2>    </FONT></DIV>
<DIV><FONT face=Arial size=2>- My WinNT box has a default encoding cp1252, and 
files edited with, for instance, "Notepad" are thus encoded.</FONT></DIV>
<DIV><FONT face=Arial size=2>   </FONT></DIV>
<DIV><FONT face=Arial size=2>- Pythonwin edits and reads files in "utf-8" 
encoding, so if I open in pythonwin a file edited in "notepad" I will get the 
file messed up, and the other way round.</FONT></DIV>
<DIV><FONT face=Arial size=2>    </FONT></DIV>
<DIV><FONT face=Arial size=2>- So, I guess, what I am trying to find is a way to 
have pythonwin reading/writing files using my choice 
of encoding</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>  To do this I browsed this group, and found a 
few threads on this, but I only got this all messed up; this is what I could 
make out:</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial 
size=2>            - I 
can change python's default encoding (which is ascii) in "site.py", but I 
really do not know what is the effect of this</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>        
    - Regarding pythonwin, Mark suggested installing the patch 
that can be downloaded for his site, and then a further patch, but:</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>        
            1. The downloaded patch 
does not work for me. I get a "cannot import 
pywin.is_platform_unicode"</FONT></DIV>
<DIV><FONT face=Arial size=2>        
            2. I followed another 
hint indicating that I should change "pywin.is_platform_unicode" to 
"pywin.scintilla.view.is_platform_unicode", but I get the same 
result</FONT></DIV>
<DIV><FONT face=Arial size=2>        
            3. I got pythonwin to 
work using "pywin.scintilla.is_platform_unicode", but this did not solve my 
problem.</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial 
size=2>            - The 
two lines patch in "interact.py" did not work either.</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>Thank you all. I promise I will get all the answers 
on this topic sorted and posted in a website for future reference to 
everyone!</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>Arturo.</FONT></DIV></BODY></HTML>