[+] 修复转码错误问题

master 1.4
Taskeren 2019-07-11 02:40:25 +08:00
parent f02dbeabc1
commit add75a4059
1 changed files with 6 additions and 1 deletions

View File

@ -1,7 +1,10 @@
package cn.glycol.t18n;
import java.nio.ByteBuffer;
import java.nio.CharBuffer;
import java.nio.charset.Charset;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
@SuppressWarnings("unused")
@ -98,8 +101,10 @@ public class I18n {
return hasKey(key);
}
private static final Charset DEFAULT_CHARSET = Charset.forName("unicode");
private static String reEncode(String bef, Charset charset) {
byte[] bytes = bef.getBytes();
byte[] bytes = bef.getBytes(charset);
return new String(bytes, charset);
}