Unicode through filesystem tricks
Wouter van Heyst
larstiq at larstiq.dyndns.org
Fri Jan 13 21:21:27 GMT 2006
On Fri, Jan 13, 2006 at 09:32:07PM +0200, Alexander Belchenko wrote:
<snip>
> I test it on Windows. For Windows this names is not equivalent and also
> produce 2 different files:
>
> Python 2.4.2 (#67, Sep 28 2005, 12:41:11) [MSC v.1310 32 bit (Intel)] on
> win32
> Type "help", "copyright", "credits" or "license" for more information.
> >>> f = file(u"ra\u0308ksmo\u0308rga\u030as", 'wb')
> >>> f
> <open file u'ra\u0308ksmo\u0308rga\u030as', mode 'wb' at 0x01021608>
> >>> f.write('spam')
> >>> f.close()
> >>> f = file(u"r\xe4ksm\xf6rg\xe5s", 'rb')
> Traceback (most recent call last):
> File "<stdin>", line 1, in ?
> IOError: [Errno 2] No such file or directory: u'r\xe4ksm\xf6rg\xe5s'
Is it then also possible to have two files that visibly look the same,
like in Linux?
Wouter van Heyst
More information about the bazaar
mailing list