mirror of
https://github.com/gnustep/libs-base.git
synced 2025-04-23 00:41:02 +00:00
tweak
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@38938 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
d91dd0b821
commit
501dccc404
1 changed files with 6 additions and 2 deletions
|
@ -5409,7 +5409,7 @@ appendString(NSMutableData *m, NSUInteger offset, NSUInteger fold,
|
|||
NSString *s = [hdr objectForKey: @"Subtype"];
|
||||
NSStringEncoding enc;
|
||||
|
||||
if (charset == nil)
|
||||
if (nil == charset)
|
||||
{
|
||||
/* Treat xml as a special case ... if we have no charset
|
||||
* specified then we can get the charset from the xml header
|
||||
|
@ -5418,12 +5418,16 @@ appendString(NSMutableData *m, NSUInteger offset, NSUInteger fold,
|
|||
{
|
||||
charset = [documentClass charsetForXml: content];
|
||||
}
|
||||
if (charset == nil)
|
||||
if (nil == charset)
|
||||
{
|
||||
charset = @"utf-8";
|
||||
}
|
||||
}
|
||||
enc = [documentClass encodingFromCharset: charset];
|
||||
if (NSASCIIStringEncoding == enc)
|
||||
{
|
||||
enc = NSUTF8StringEncoding;
|
||||
}
|
||||
s = [NSStringClass allocWithZone: NSDefaultMallocZone()];
|
||||
s = [s initWithData: content encoding: enc];
|
||||
IF_NO_GC([s autorelease];)
|
||||
|
|
Loading…
Reference in a new issue