Allow decoding even shorter strings in fallback encoding

Complete UTF-8 characters (except leading nulls) never appear in failed decoding attempts when the input is fed byte by byte.
This commit is contained in:
Pavel Tyunin
2020-10-07 17:31:42 +03:00
parent 1cbcf24832
commit c9dd9e96a1
2 changed files with 15 additions and 17 deletions

View File

@@ -226,7 +226,7 @@ void ConvAutoTestCase::FallbackMultibyte()
void ConvAutoTestCase::FallbackShort()
{
TestFirstChar("\x61\x61\x61\xc4", 'a', 4,
TestFirstChar("\x61\xc4", 'a', 2,
ConvState(wxBOM_None, wxFONTENCODING_ISO8859_5, true),
wxFONTENCODING_ISO8859_5);
}