Respect charset when loading scripts
This commit is contained in:
@@ -50,7 +50,7 @@ public class ByteBufInPacket implements InPacket {
|
||||
short length = readShort();
|
||||
byte[] stringBytes = new byte[length];
|
||||
byteBuf.readBytes(stringBytes);
|
||||
return new String(stringBytes, CharsetConstants.PACKET_CHARSET);
|
||||
return new String(stringBytes, CharsetConstants.CHARSET);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -78,12 +78,12 @@ public class ByteBufOutPacket implements OutPacket {
|
||||
@Override
|
||||
public void writeString(String value) {
|
||||
writeShort((short) value.length());
|
||||
writeBytes(value.getBytes(CharsetConstants.PACKET_CHARSET));
|
||||
writeBytes(value.getBytes(CharsetConstants.CHARSET));
|
||||
}
|
||||
|
||||
@Override
|
||||
public void writeFixedString(String value) {
|
||||
writeBytes(value.getBytes(CharsetConstants.PACKET_CHARSET));
|
||||
writeBytes(value.getBytes(CharsetConstants.CHARSET));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user