windows - Python console can't deal with Unicode? -
(i'm using python 3.4 this, on windows)
so, have code whipped out better show troubles:
#!/usr/bin/env python # -*- coding: utf-8 -*- import os os.startfile('c:\\téxt.txt')
on idle works should (it opens file specified), on console (double-click) keeps saying windows can't find file. of course, if try open "text.txt" instead works perfectly, long exists.
it's driving me insane. me, please.
you using wrong encoding, try using cp1252
-
# -*- coding: cp1252 -*-
Comments
Post a Comment