bug: Incorrect UTF-16 detection
From: Sébastien Kirche <sebastien.kirche_at_free.fr>
Date: Wed, 7 Oct 2015 06:45:52 -0700 (PDT)
Hi,
I have noticed that for files smaller than 50 bytes it brakes the Unicode detection of TortoiseMerge that displays my small files like chinese with wrong shown encoding of utf-16le. If I artificially increase the size over 50 bytes the file is shown correctly.
It seems that the culprit is in src/TortoiseMerge/FileTextLines.cpp at lines 122 (and perhaps 153) in a hack that consists in comparing a null character count to the file size divided by 50. For files smaller than 50 bytes, any number of null characters will incorrectly result in an utf-16 display.
------------------------------------------------------
To unsubscribe from this discussion, e-mail: [users-unsubscribe_at_tortoisesvn.tigris.org].
|
This is an archived mail posted to the TortoiseSVN Users mailing list.
This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.