Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

UnicodeDecodeError with non-ASCII characters in message definition #94

Closed
moooeeeep opened this issue Jul 4, 2018 · 2 comments
Closed

Comments

@moooeeeep
Copy link
Contributor

moooeeeep commented Jul 4, 2018

I have custom message definitions that contain UTF-8 encoded characters in the comments. When I try to filter topics from bagfiles that contain these messages, it fails with UnicodeDecodeError.

I already described it here:

And linked to a related entry in the ROS Q&A:

On my machine I could work around this by removing the call to .encode() in the line highlighted in the Traceback:

I don't know what other side effects this may produce (maybe with other file encodings of the message definition?), but so far it seems to work...

@moooeeeep
Copy link
Contributor Author

moooeeeep commented Jul 9, 2018

Here is already a PR related to this issue: #80

dirk-thomas pushed a commit that referenced this issue Apr 9, 2019
* Added failing test case for utf-8 encoded characters in comments

Addressing the issue described here: #94

* Workaround to satisfy failing test case (utf-8 in comments)

* open temporary file in non-binary write-only mode

 * The default open mode is 'w+b' which requires
   a bytes-like object in Python 3.
 * Now we can write the full_text string without
   encoding it first.
@moooeeeep
Copy link
Contributor Author

This issue got fixed by #95

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant