Hi:
Last night I was working with Python in Geany, and when running the following code, I obtain different behaviors:
<code>
#!/usr/bin/python
dictio = {9: None, 10: None, 11: None, 12: None, 13: None, 14: None, 15: 'abcd\xd7\xa9\xd7\x91\xd7\x97\xd7\x99', 16: '\xd7\x99\xd7\xa8\xd7\x95 \xd7\xa9\xd7\x9c\xd7\x99\xd7\x9dxyz', 17: None, 18: '\xd7\x93\xd7\xa7 \xd7\x9c\xd7\x95\xd7\x9f', 19: None, 20: '\xd7\xa9', 21: None, 22: 'Ticking', 23: None, 24: 'away', 25: None, 26: 'the', 27: None, 28: None, 29: None, 30: None, 31: None, 32: None, 33: None, 34: None, 35: None, 36: 'moments', 37: 'that', 38: 'makes', 39: 'up', 40: 'a', 41: 'dull', 42: 'day'}
val = dictio.values() summ = ''
for vl in val: if vl <> None: summ = summ + ' '+ vl
print summ
</code>
Paste the code in geany, and save it as, let's say, bang.py. Then press F5 to get it running. You'll see some garbage in the white windows that pops up, like this:
abcdש××× ×ר×ש×××ק×××
but not the last words.
But, if you run it from terminal (system terminal or VTE inside Geany), you will get:
abcdש××× ×ר×ש×××xyz ×ק××× ×© Ticking away the moments that makes up a dull day
That was what I was expecting!
Also, when the example code was running in a loop (with F5), with different dictionaries, the dictionaries prior to this one, were shown correctly, but it stop showing text from this dictionary on.
I know this strings are extremely odd, but that's exactly what I'm receiving from the database...
I'll appreciate any answer or explanation about this behavior, but I think this looks like a bug ;-)
Best Regards,
nat:.
__________________________________________
Participe en Universidad 2008. 11 al 15 de febrero del 2008. Palacio de las Convenciones, Ciudad de la Habana, Cuba http://www.universidad2008.cu
On Tue, 15 Jan 2008 12:02:34 -0500, "Ing. Nestor Alonso Torres" nestor@electrica.cujae.edu.cu wrote:
Hi:
Last night I was working with Python in Geany, and when running the following code, I obtain different behaviors:
<code> [snipped the code] </code>
Paste the code in geany, and save it as, let's say, bang.py. Then
Just to prevent others from the same mistake I did: all after "dictio =" until "'day'}" has to be on one line.
press F5 to get it running. You'll see some garbage in the white windows that pops up, like this:
I guess the white window is a xterm?
abcdש××× ×ר×ש×××ק×××
but not the last words.
Seems like the started terminal(look in preferences dialog -> Tools -> Terminal) doesn't support Unicode. VTE does support Unicode and so the output works in the embedded VTE in Geany.
But, if you run it from terminal (system terminal or VTE inside Geany), you will get:
What is your "system terminal"? Try to set it in the preferences dialog and try what happens.
abcdש××× ×ר×ש×××xyz ×ק××× ×© Ticking away the moments that makes up a dull day
That was what I was expecting!
This is also what I get with the embedded VTE in Geany and with Terminal (the terminal emulation of Xfce, which also uses VTE) and I get this also with Unicode-enabled xterm.
Also, when the example code was running in a loop (with F5), with different dictionaries, the dictionaries prior to this one, were shown correctly, but it stop showing text from this dictionary on.
I guess this is related to the above.
Regards, Enrico
On Wed, 2008-01-16 at 08:09 +0100, Enrico Tröger wrote:
On Tue, 15 Jan 2008 12:02:34 -0500, "Ing. Nestor Alonso Torres" nestor@electrica.cujae.edu.cu wrote:
Seems like the started terminal(look in preferences dialog -> Tools -> Terminal) doesn't support Unicode. VTE does support Unicode and so the output works in the embedded VTE in Geany.
This is also what I get with the embedded VTE in Geany and with Terminal (the terminal emulation of Xfce, which also uses VTE) and I get this also with Unicode-enabled xterm.
I've changed terminal to xfce, and it works like a charm.
Thanks a lot!
nat:.
__________________________________________
Participe en Universidad 2008. 11 al 15 de febrero del 2008. Palacio de las Convenciones, Ciudad de la Habana, Cuba http://www.universidad2008.cu