Hi there,
I use Geany to play around with Python 3.1 ans I've spotted a nasty
behaviour (wich I'm enough qualified to tell if it's a bug and from
where it come, me, python or Geany ?). I run Geany 0.17, hand compiled.
The following script (saved under ~\test\test.py) :
# -*- coding: utf-8 -*-
s = 'abcdefghijklmnopqrstuvwxyzéèêàç'
print(s.encode('utf-8'))
cause that error :
Traceback (most recent call last):
File "test.py", line 3, in <module>
print(s.encode('utf-8'))
UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 26:
ordinal not in range(128)
when ran using F5 (or run (exécuter in Fench) in geany).
But running :
[CapitaineCrochet@PeterPan test]$ python3 test.py
result in :
b'abcdefghijklmnopqrstuvwxyz\xc3\xa9\xc3\xa8\xc3\xaa\xc3\xa0\xc3\xa7'
which is exactly what I'm waiting for...
As I'm only using Geany for python i've replaced the make tool command
by 'python3'.
Where I'm wrong ?
And by the way, thank for making Geany which fit almost exactly my needs
:) Something that other code editors are far from approaching.
Cheers !
Thomas