Í
Íéêüëáïò Êïýñáò
Ôç ÔåôÜñôç, 5 Éïõíßïõ 2013 9:32:15 ì.ì.UTC+3, ï ÷ñÞóôçò MRAB Ýãñáøå:' leade to that unknown encoding of this bytestream '\305\365\367\336\ \364\357\365\ \311\347\363\357\375.mp3'
Actually you were correct i was typing greek and is aw the fileneme here ingogole groups as:
so maybe the filenames have to be decoded to greek-iso but then agian the contain both greek letters but their extension are in english chars like '.mp3'
Iam not sure i follow:
Change this:
# Compute a set of current fullpaths
fullpaths = set()
path = "/home/nikos/public_html/data/apps/"
for root, dirs, files in os.walk(path):
for fullpath in files:
fullpaths.add( os.path.join(root, fullpath) )
to what to make the full url readable by files.py?
Actually you were correct i was typing greek and is aw the fileneme here ingogole groups as:
so maybe the filenames have to be decoded to greek-iso but then agian the contain both greek letters but their extension are in english chars like '.mp3'
Using Python, I think you could get the filenames using os.listdir,
passing the directory name as a bytestring so that it'll return the
names as bytestrings.
Then, for each name, you could decode from its current encoding and
encode to UTF-8 and rename the file, passing the old and new paths to
os.rename as bytestrings.
Iam not sure i follow:
Change this:
# Compute a set of current fullpaths
fullpaths = set()
path = "/home/nikos/public_html/data/apps/"
for root, dirs, files in os.walk(path):
for fullpath in files:
fullpaths.add( os.path.join(root, fullpath) )
to what to make the full url readable by files.py?