mirror of
https://github.com/inverse-inc/sogo.git
synced 2026-05-21 03:15:25 +00:00
(fix) fallback to Latin1 when trying to parse versit data
This commit is contained in:
@@ -1075,6 +1075,12 @@ static NSCharacterSet *whitespaceCharSet = nil;
|
||||
// FIXME: Data is not always utf-8.....
|
||||
source = [[[NSString alloc] initWithData: _data encoding: encoding]
|
||||
autorelease];
|
||||
|
||||
// We fallback to ISO-8859-1 string encoding
|
||||
if (!source)
|
||||
source = [[[NSString alloc] initWithData: _data encoding: NSISOLatin1StringEncoding]
|
||||
autorelease];
|
||||
|
||||
if (!source)
|
||||
{
|
||||
e = (id)[SaxParseException exceptionWithName: @"SaxIOException"
|
||||
|
||||
Reference in New Issue
Block a user