friends.
I deal with an issue in TextMate, which I use to write code normally.
For my hash map script I need to encode a string into bytes.
As an example if I write:
password = "orange"
bytes_list = list(password.encode())
print(bytes_list)
The expected output is [111, 114, 97, 110, 103, 101]
which I get if I run the script from Python's IDLE and even if I write the same code in my shell.
But if I run the code in TextMate, the result yields ['o', 'r', 'a', 'n', 'g', 'e']
, so it's obvious, that the encode() function in TextMate is not working as expected.
The funny part is, that if I execute the code from TextMate to shell it doesn't work neither.
In the preferences of TextMate the Encoding is set to Unicode - UTF-8 and the Unicode bundle is installed.
I couldn't find any answer via Google to this topic. Maybe some of you came across such issue in the past.
Thanks for any help.