fixes of wierd unicode text
This commit is contained in:
parent
59ebb3265c
commit
fb734a2b3a
@ -27,18 +27,6 @@ public class ExBinaryReader : BinaryReader
|
||||
return this;
|
||||
}
|
||||
|
||||
public ExBinaryReader Seek(uint offset, SeekOrigin seekOrigin = SeekOrigin.Begin)
|
||||
{
|
||||
BaseStream.Seek(offset, seekOrigin);
|
||||
return this;
|
||||
}
|
||||
|
||||
public ExBinaryReader Seek(long offset, SeekOrigin seekOrigin = SeekOrigin.Begin)
|
||||
{
|
||||
BaseStream.Seek(offset, seekOrigin);
|
||||
return this;
|
||||
}
|
||||
|
||||
public string ReadNextUnicodeString() => ReadUnicodeString(ReadInt32());
|
||||
|
||||
public string ReadUnicodeString(int length)
|
||||
@ -50,7 +38,7 @@ public class ExBinaryReader : BinaryReader
|
||||
_ => ReadBytes(doubleLength)
|
||||
};
|
||||
|
||||
return Encoding.UTF8.GetString(bytes);
|
||||
return Encoding.Unicode.GetString(bytes);
|
||||
}
|
||||
|
||||
public string ReadNextAsciiString() => ReadAsciiString(ReadInt32());
|
||||
|
||||
@ -23,7 +23,7 @@ public static class Extensions
|
||||
{
|
||||
var i = span.Length - 1;
|
||||
while (i > 0 && span[i--] == val) ;
|
||||
return span;
|
||||
return span[..i];
|
||||
}
|
||||
|
||||
public static ExBinaryReader NextAsciiStringMustEqual(this ExBinaryReader binReader, string text)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user