StyledText translator: use a larger buffer for encoding detection

It may be the case that a file is largely ASCII with few UTF-8 or
similar characters (typically, english text mentionning names in other
languages). It turns out 2 kilobytes of text is not enough for a safe
guess in that case.

Fixes #14674

Change-Id: Id894bebb821c22a17b776a71822d011abc795dea
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2628
Reviewed-by: waddlesplash <[email protected]>
This commit is contained in:
Adrien Destugues
2020-05-09 19:34:22 +00:00
committed by waddlesplash
parent 2e6ca31c5a
commit 8bb5fd2437
@@ -33,7 +33,7 @@ using namespace std;
#define B_TRANSLATION_CONTEXT "STXTTranslator"
#define READ_BUFFER_SIZE 32768
#define DATA_BUFFER_SIZE 2048
#define DATA_BUFFER_SIZE 8192
// The input formats that this translator supports.
static const translation_format sInputFormats[] = {