uchardet_get_charset() should never return NULL...

... to stay backward compatible with previous behavior.
About detection failure, our in-code documentation says:
"@return name of charset on success and "" on failure or pure ascii."
This behavior had been broken by commit 3a518c0, which returned NULL
instead. Our command-line tool was the first victim, segfaulting on
ASCII files.
This commit is contained in:
Jehan 2015-11-16 17:33:16 +01:00
parent d0ccdd5db9
commit 256d1957b2

View File

@ -75,7 +75,7 @@ public:
const char* GetCharset() const
{
return m_charset;
return m_charset? m_charset : "";
}
};