Hello, according to dicuss aboutl farewell of Python 2.4 I tried to update my 2.5 to 2.7.2. And I have good reason for me to stay on old version
I am using Windows XP cz (windows-1250)
When I have in my user-config no console_encoding:
Py 2.5 : -I have good czech characters in terminal window - I can write e.q. Interwiki.py Dobříš - I can write e.g. interwiki.py and after ask I write Dobříš
= everything works well for me
Py 2.6+ -I have bad czech characters in terminal window (ˇ instead of í, " " instead of á, nothing instead of ů, ý instead of ř....) - I can write e.q. Interwiki.py Dobříš - I can write e.g. interwiki.py and after ask I write Dobříš
= I am not able to read in terminal window
With console_encoding='windows-1250'
Py 2.6+ -I have good czech characters in terminal window - I can write e.q. Interwiki.py Dobříš - I can't write e.g. interwiki.py and after ask I write Dobříš
= I am not able to write to terminal window
With console_encoding='utf-8'
Py 2.6+ -I have bad non-base-ASCII characters in terminal window (two or three instead of one, translitertation for cyrilic or asian languages doesn't work - I can't write e.q. Interwiki.py Dobříš - bot crashes - I can't write e.g. interwiki.py and after ask I write Dobříš - bot crashes
= I am not able to read or write to terminal window
With console_encoding='ISO 8859-2' -I have good czech characters in terminal window - I can't write e.q. Interwiki.py Dobříš - page does not exist - I can't write e.g. interwiki.py and after ask I write Dobříš - page does not exist, bad chars in terminal window
= I am not able to write to terminal window
So, how to use py 2.6+ and with correct and usable encoding? Or, should I write this to survey page?
JAnD
On 1 March 2012 08:27, Jan Dudík jan.dudik@gmail.com wrote:
I am using Windows XP cz (windows-1250)
We should just stop supporting windows ;-)
So, how to use py 2.6+ and with correct and usable encoding?
This is a bug, and it should most certainly be fixed. However, I'm somewhat confused on how this changes between python versions - this is for the same computer?
However, I'm not sure about the 'windows-1250' you mention - are you sure it's not code page 852? You can check this by running 'chcp' in a cmd window. In addition, please run the following lines in python (preferrably in all three versions):
import sys
sys.getdefaultencoding()
The output will probably depend on how you run the bot - via cmd, via IDLE or maybe even whether you run a script directly or not...
Best, Merlijn
You're right, CP is 852. Because of some window specific programs is variant a) not usable for me ;-) (and I know about linux only, that exists)
I don't know, how to run these lines in python - I created file a.py containing this, but after run there is no output. Usually I write my commands to commandline in total commander or via cmd.
JAnD
Dne 1. března 2012 9:03 Merlijn van Deen valhallasw@arctus.nl napsal(a):
On 1 March 2012 08:27, Jan Dudík jan.dudik@gmail.com wrote:
I am using Windows XP cz (windows-1250)
We should just stop supporting windows ;-)
So, how to use py 2.6+ and with correct and usable encoding?
This is a bug, and it should most certainly be fixed. However, I'm somewhat confused on how this changes between python versions - this is for the same computer?
However, I'm not sure about the 'windows-1250' you mention - are you sure it's not code page 852? You can check this by running 'chcp' in a cmd window. In addition, please run the following lines in python (preferrably in all three versions):
import sys
sys.getdefaultencoding()
The output will probably depend on how you run the bot - via cmd, via IDLE or maybe even whether you run a script directly or not...
Best, Merlijn
On 1 March 2012 09:18, Jan Dudík jan.dudik@gmail.com wrote:
I don't know, how to run these lines in python - I created file a.py containing this, but after run there is no output.
The easiest way is starting python via cmd (c:\python25\python.exe or c:\python26\python.exe or ...), then to type/paste those two lines. You can close the interpreter by calling exit().
Usually I write my commands to commandline in total commander or via cmd.
Is there any difference between using totalcmd and cmd?
Best, Merlijn
pywikipedia-l@lists.wikimedia.org