davsclaus commented on code in PR #15515: URL: https://github.com/apache/camel/pull/15515#discussion_r1754630048
########## components/camel-jackson/src/test/java/org/apache/camel/component/jackson/JacksonMarshalMultibyteCharactersTest.java: ########## @@ -0,0 +1,68 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.apache.camel.component.jackson; + +import org.apache.camel.builder.RouteBuilder; +import org.apache.camel.component.mock.MockEndpoint; +import org.apache.camel.test.junit5.CamelTestSupport; +import org.junit.jupiter.api.Test; + +import java.util.HashMap; +import java.util.Map; + +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertNotEquals; + +public class JacksonMarshalMultibyteCharactersTest extends CamelTestSupport { + + @Test + public void testMarshalAndUnmarshalMap() throws Exception { + Map<String, Object> in = new HashMap<>(); + in.put("name", "システム𩸽"); Review Comment: We do not store non-ascii characters directly in the source code. You can use Java unicode syntax to build up those chars. See this unit test https://github.com/apache/camel/blob/main/core/camel-core/src/test/java/org/apache/camel/component/file/FileConvertBodyToUTF8Test.java It uses the thai elephant symbol https://www.compart.com/en/unicode/U+0E08 I assume you can find the uni code for those symbols above and use the java string syntax for these values. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
