mirror of
https://github.com/nitu2003/T18n
synced 2024-11-21 23:28:49 +00:00
[+] 修复转码错误问题
This commit is contained in:
parent
f02dbeabc1
commit
add75a4059
@ -1,7 +1,10 @@
|
|||||||
package cn.glycol.t18n;
|
package cn.glycol.t18n;
|
||||||
|
|
||||||
|
import java.nio.ByteBuffer;
|
||||||
|
import java.nio.CharBuffer;
|
||||||
import java.nio.charset.Charset;
|
import java.nio.charset.Charset;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
|
import java.util.Arrays;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
@SuppressWarnings("unused")
|
@SuppressWarnings("unused")
|
||||||
@ -98,8 +101,10 @@ public class I18n {
|
|||||||
return hasKey(key);
|
return hasKey(key);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private static final Charset DEFAULT_CHARSET = Charset.forName("unicode");
|
||||||
|
|
||||||
private static String reEncode(String bef, Charset charset) {
|
private static String reEncode(String bef, Charset charset) {
|
||||||
byte[] bytes = bef.getBytes();
|
byte[] bytes = bef.getBytes(charset);
|
||||||
return new String(bytes, charset);
|
return new String(bytes, charset);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user