UE3 knows exactly two string encodings -- one is apparently the ISO-8859-1 encoding, the other is UTF-16-LE. Strings that can not be encoded with the former will instead use the latter with wide chars (two bytes per char). This is indicated by a negative string length -- the absolute value of the encoded length is the length in characters of the string, so if it's negative, you will have to read 2*abs(n) bytes and parse it as a UTF-16-LE string.
Decoding of the following file fails with an ArgumentOutOfRangeException: save_äẞü.zip
UE3 knows exactly two string encodings -- one is apparently the ISO-8859-1 encoding, the other is UTF-16-LE. Strings that can not be encoded with the former will instead use the latter with wide chars (two bytes per char). This is indicated by a negative string length -- the absolute value of the encoded length is the length in characters of the string, so if it's negative, you will have to read
2*abs(n)
bytes and parse it as a UTF-16-LE string.Decoding of the following file fails with an
ArgumentOutOfRangeException
: save_äẞü.zipẞ is the capital sharp s.