Open martinschilliger opened 8 years ago
I could reproduce the bug, it is due to the particular a char in your dir named: Bstäpp. I will take a look soon. Thanks for reporting!
Hi,
I had the same issue with 'é, è, à' in French, and found a quick way to fix it.
In the function get_valid_cwd()
in utils.sys
, try to replace :
cwd = os.getcwd()
by
cwd = os.getcwd().decode('utf-8')
I'm not 100% sure why it works though. The getcwd
function returns a unicode
object, which needs to be decoded. So I think that Python implicitly somehow does it, probably in ascii by default. With it, I force the string to be in UTF8.
I'll read more about encodings in python later, and I'll come back here if I find a clear explanation. Hope this helped.
Cool! Thank you very much, it worked!
I have a problem, which I wasn't able to fix myself. If my directory i want to
cd
in contains german umlauts, then I got the error mentioned in the title:Any idea where to encode de ascii-string in the promptastic.py? Thanks for your help!