I have been dealing with an issue regarding the terminal in my Macbook. I am passing greek words in a python string e.g.
text = 'Καλημέρα κόσμε'
and every time I try to perform any simple task to it like splitting in spaces the result I get looks like this:
['\xce\x9a\xce\xb1\xce\xbb\xce\xb7\xce\xbc\xce\xad\xcf\x81\xce\xb1',
'\xce\xba\xcf\x8c\xcf\x83\xce\xbc\xce\xb5']
The same thing happens when I use the collections.Counter() function as well.
On the other hand when I print the string the output is as expected:
Καλημέρα κόσμε
I tried doing what is mentioned here: In OSX Lion, LANG is not set to utf8, how fix? (by changing en_US.UTF-8 to el_GR.UTF-8) without any luck.
Anyone has an idea why that happens and how I can tackle that?
Thank you in advance.