Hi,
I use replace.py and the Euro sign appears as a gray question mark (?) (that means the default in transliteration.py, but not even yellow) instead of a yellow "*E*". I checked with copy and paste that it is literally shown in 230th line of transliteration.py. I also checked Japanese yen that appears correctly (just 2 lines below Euro in transliteration.py). Ukrainian гривня (₴) is not listed, it appears as a *yellow ?*. Help me, where to begin debugging?
2012/3/25 Marcin Cieslak saper@saper.info
I use replace.py and the Euro sign appears as a gray question mark (?) (that means the default in transliteration.py
Appears where?
On my DOS screen (Windows 7, Hungarian). Pywikipedia trunk/pywikipedia/ (r10039, 2012/03/23, 15:34:47) Python 2.7.2 (default, Jun 12 2011, 14:24:46) [MSC v.1500 64 bit (AMD64)] config-settings: use_api = True use_api_login = True unicode test: ok
Or do you mean the article?
On 25 March 2012 14:21, Bináris wikiposta@gmail.com wrote:
On my DOS screen (Windows 7, Hungarian).
There's your problem ;-)
Have you set any console encoding in your user-config? What is the output of chcp in a dos screen? They might have a mismatch, causing the € not to be changed by the pwb code (the yellow ?'s), but changed afterwards by the console.
2012/3/25 Merlijn van Deen valhallasw@arctus.nl
Have you set any console encoding in your user-config? What is the output of chcp in a dos screen? They might have a mismatch, causing the EURO not to be changed by the pwb code (the yellow ?'s), but changed afterwards by the console.
The fact is that my life is a continous fight with console encoding. This is the dark side of being Hungarian in the world of computers (despite the many Hungarian founder fathers of computing). :-((( It was never perfect on my previous computer with Hungarian Windows XP Prof. That computer is already dead. Than I changed to a laptop that had an English XP Home. I was glad to see that I could write the encoding found in output of "mode" command to user-config.py, and everything was perfect! For a while. My present computer is a Hungarian Windows 7 (6.1.7601). Mode/chchp commands write codepage 852. I wrote it to user-config.py but was not good. I had to experiment a lot. The good news is that I tried it again now after your nightly commits to Pywiki and it seems to be good!!! That's great! I can write accented Hungarian letters again. (By this time I could do it at the command prompt but not witih Pywikibot, e.g. when letting replace.py to ask the old and new text or summary). Euro sign works like this: I copied EUROhttp://hu.wikipedia.org/w/index.php?title=Semmi&action=edit&redlink=1from Wikipedia to command line. It appeared as a gray "?" again (see the screenshot in the other thread), but was interpreted correctly. C:\Pywikipedia>p replace.py -page:User:BinBot/semmi Please enter the text that should be replaced: ? Please enter the new text: ee [...] Press Enter to use this default message, or enter a description of the changes your bot will make: árvíztűrő tehéntúró Getting 1 page from wikipedia:hu...
Upon replacing the Euro sign appeared as a red *?* as it was the old text to be replaced, and the result is: http://hu.wikipedia.org/w/index.php?title=Szerkeszt%C5%91:BinBot/semmi&d... So I can write now, I can paste now, the only problem is with displaying. (I still cannot paste Russian Cyrillic text to command line but that is my least problem in the moment, I will write a wrapper script for that.)
I forgot a part of the answer: chcp shows 852, and whatever encoding I write to user-config or I comment it out, the result is the same for Euro.
The problem has been solved, thanks to Merlijn (see the thread "SVN: [10043] trunk/pywikipedia/userinterfaces").