Merge pull request #164 from P0nk/fix/custom-charset-string #patch
Fix writeString not fully respecting charset
This commit is contained in:
@@ -71,8 +71,9 @@ public class ByteBufOutPacket implements OutPacket {
|
||||
|
||||
@Override
|
||||
public void writeString(String value) {
|
||||
writeShort((short) value.length());
|
||||
writeBytes(value.getBytes(CharsetConstants.CHARSET));
|
||||
byte[] bytes = value.getBytes(CharsetConstants.CHARSET);
|
||||
writeShort(bytes.length);
|
||||
writeBytes(bytes);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user