Skip to content

Commit e291adc

Browse files
jacobperronivanpauno
authored andcommitted
Add compiler option for wide string encoding
This is more of a workaround, since I expect users that try to define their own messages with wide strings to run into the same issue. It would be nice if they didn't also have to specify an encoding. Signed-off-by: Jacob Perron <jacob@openrobotics.org>
1 parent 960f896 commit e291adc

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

rosidl_generator_java/CMakeLists.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,10 @@ if(BUILD_TESTING)
3838
find_package(ament_lint_auto REQUIRED)
3939
ament_lint_auto_find_test_dependencies()
4040

41+
# TODO(jacobperron): This fixes generating messages with wstrings.
42+
# Figure out why this is needed as of Foxy, and how we can remove this workaround
43+
set(CMAKE_JAVA_COMPILE_FLAGS "-encoding" "ISO-8859-1")
44+
4145
include(cmake/register_java.cmake)
4246
include(cmake/rosidl_generator_java_get_typesupports.cmake)
4347

0 commit comments

Comments
 (0)