btigi / tlktosql

A command line utility to read string information from dialog.tlk files used Infinity Engine to an SQLite database
Other
2 stars 1 forks source link

Icewind Dale 2 German DE dialog.tlk file results in failure #1

Closed ghostlyghastly closed 1 year ago

ghostlyghastly commented 1 year ago

Thank you for this amazing tool! Works great for BG1 BG2 IWD1 PS:T

Unfortunately, the encoding in IWD2 (German) doesn't work. iwd2_de_dialog.tlk.zip

TlkViewer for example shows: image

Unhandled exception. System.ArgumentException: The output char buffer is too small to contain the decoded characters, encoding 'Unicode (UTF-8)' fallback 'System.Text.DecoderReplacementFallback'. (Parameter 'chars')
   at System.Text.Encoding.ThrowCharsOverflow(DecoderNLS decoder, Boolean nothingDecoded)
   at System.Text.Encoding.GetCharsWithFallback(ReadOnlySpan`1 bytes, Int32 originalBytesLength, Span`1 chars, Int32 originalCharsLength, DecoderNLS decoder)
   at System.Text.UTF8Encoding.GetCharsWithFallback(ReadOnlySpan`1 bytes, Int32 originalBytesLength, Span`1 chars, Int32 originalCharsLength, DecoderNLS decoder)
   at System.Text.Encoding.GetCharsWithFallback(Byte* pOriginalBytes, Int32 originalByteCount, Char* pOriginalChars, Int32 originalCharCount, Int32 bytesConsumedSoFar, Int32 charsWrittenSoFar, DecoderNLS decoder)
   at System.Text.Encoding.GetChars(Byte* pBytes, Int32 byteCount, Char* pChars, Int32 charCount, DecoderNLS decoder)
   at System.Text.DecoderNLS.GetChars(Byte* bytes, Int32 byteCount, Char* chars, Int32 charCount, Boolean flush)
   at System.Text.Decoder.GetChars(ReadOnlySpan`1 bytes, Span`1 chars, Boolean flush)
   at System.IO.BinaryReader.InternalReadChars(Span`1 buffer)
   at System.IO.BinaryReader.ReadChars(Int32 count)
   at TlkToSql.Program.TlkFileBinaryReader.ParseFile(BinaryReader br)
   at TlkToSql.Program.TlkFileBinaryReader.Read(Stream s)
   at TlkToSql.Program.TlkFileBinaryReader.Read(String filename)
   at TlkToSql.Program.Main(String[] args)
btigi commented 1 year ago

This should be resolved in release 0.7, available today :)