I used a php-script to create directories, using words (categories names) that I've fetched from a site (utf-8), but when I created those directories, I see that there are unreadable characters instead of real words.
AFAIK PHP under Windows is working within cp1251
locale and can't work with utf-8
filenames/dirnames.
So the question is, is it possible to use Python to walk over all of the directories and rename them to utf-8 charset?
Looks like that piece of code works, now i only need to make recursive walk through the dirs and rename all of them.
basedir = "C:\\Users\\alex\\Desktop\\1\\save"
dirs = os.listdir(basedir)
for fn in dirs:
print fn
nn = fn.decode('utf-8')
os.rename(os.path.join(basedir,fn), os.path.join(basedir,nn))