Skip to content

Commit 713388a

Browse files
authored
Fix testDecode_Backspace (#15034)
1 parent ccb23f0 commit 713388a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

dubbo-remoting/dubbo-remoting-api/src/test/java/org/apache/dubbo/remoting/codec/TelnetCodecTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -247,7 +247,7 @@ void testDecode_Backspace() throws IOException {
247247
testDecode_assertEquals(new byte[] {'\b'}, Codec2.DecodeResult.NEED_MORE_INPUT, new String(new byte[] {32, 8}));
248248

249249
// test chinese
250-
byte[] chineseBytes = "中".getBytes();
250+
byte[] chineseBytes = "中".getBytes(StandardCharsets.UTF_8);
251251
byte[] request = join(chineseBytes, new byte[] {'\b'});
252252
testDecode_assertEquals(request, Codec2.DecodeResult.NEED_MORE_INPUT, new String(new byte[] {32, 32, 8, 8}));
253253
// There may be some problem handling chinese (negative number recognition). Ignoring this problem, the

0 commit comments

Comments
 (0)