Skip to content

Commit

Permalink
Change decode error mode to replace (#176) (#180)
Browse files Browse the repository at this point in the history
Signed-off-by: Tomoya Fujita <Tomoya.Fujita@sony.com>
(cherry picked from commit 20df683)

Co-authored-by: Tomoya Fujita <Tomoya.Fujita@sony.com>
  • Loading branch information
mergify[bot] and fujitatomoya committed Oct 19, 2022
1 parent 075a38a commit 010ebc9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions rosidl_generator_py/resource/_msg_support.c.em
Original file line number Diff line number Diff line change
Expand Up @@ -683,7 +683,7 @@ nested_type = '__'.join(type_.namespaced_name())
(void)rc;
assert(rc == 0);
@[ elif isinstance(member.type.value_type, AbstractString)]@
PyObject * decoded_item = PyUnicode_DecodeUTF8(src[i].data, strlen(src[i].data), "strict");
PyObject * decoded_item = PyUnicode_DecodeUTF8(src[i].data, strlen(src[i].data), "replace");
if (!decoded_item) {
return NULL;
}
Expand Down Expand Up @@ -749,7 +749,7 @@ nested_type = '__'.join(type_.namespaced_name())
field = PyUnicode_DecodeUTF8(
ros_message->@(member.name).data,
strlen(ros_message->@(member.name).data),
"strict");
"replace");
if (!field) {
return NULL;
}
Expand Down

0 comments on commit 010ebc9

Please sign in to comment.