Updates:
        Summary: `Grep File` does not work with UTF-16 since RF 2.8.2
        Status: Accepted
        Labels: Target-2.8.5

Comment #1 on issue 1665 by pekka.klarck: `Grep File` does not work with UTF-16 since RF 2.8.2
http://code.google.com/p/robotframework/issues/detail?id=1665

This problem was caused by Grep File reading and encoding files line-by-line and not by reading the whole file into memory (issue 1562). The root cause is that UTF-16 can be either little or big endian, denoted by a BOM starting the file, and decoding lines individually thus doesn't work.

It seems that opening the file using codecs.open [1] fixes the problem. Most likely it uses an incremental decoder internally. A problem with using codecs.open is that it doesn't support automatic newline conversion, so we need to add some extra code to handle that. Unfortunately io.open [2] that handles both decoding and newlines is only available in Python 2.6 and newer.

[1] http://docs.python.org/2/library/codecs.html#codecs.open
[2] http://docs.python.org/2/library/io.html#io.open

--
You received this message because this project is configured to send all issue notifications to this address.
You may adjust your notification preferences at:
https://code.google.com/hosting/settings

--

--- You received this message because you are subscribed to the Google Groups "robotframework-commit" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to robotframework-commit+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to