Updates:
        Status: Accepted
        Labels: Target-2.5.4

Comment #2 on issue 643 by pekka.klarck: [Jython] UnicodeDecodeError in OperatingSystem.List Files In Directory when File contains Umlauts
http://code.google.com/p/robotframework/issues/detail?id=643

There could be a bug in os.path in [PJ]ython 2.5, but in this particular case the real root cause is different Jython bug [1]. In our case os.listdir is called with a Unicode string as an argument it should then also return Unicode strings [2]. As explained in [1], os.listdir in Jython 2.5.1 always returns byte strings (str).

[1] http://bugs.jython.org/issue1520
[2] http://docs.python.org/library/os.html#os.listdir

We have actually been bitten by this bug already earlier. The same problem occurred when parsing test data in files with non-ASCII names, and we have a workaround for it in robot/parsing/populators.py. The just tested that the same workaround works in this case too. The workaround code is attached. I don't want to commit it yet because it needs to be cleaned up a little and this bug also needs acceptance tests.


Attachments:
        listdir_issue_643.patch  681 bytes

Reply via email to