mirror of
https://github.com/gnustep/libs-base.git
synced 2025-04-22 16:33:29 +00:00
If a charset is specified which does not match the string contents,
override it. git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@16901 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
f00d10f500
commit
04c2ed4343
1 changed files with 5 additions and 1 deletions
|
@ -3560,8 +3560,12 @@ static NSCharacterSet *tokenSet = nil;
|
|||
|
||||
enc = [GSMimeDocument encodingFromCharset: charset];
|
||||
d = [content dataUsingEncoding: enc];
|
||||
if (d == nil)
|
||||
{
|
||||
charset = nil; // String can't be converted to this charset
|
||||
}
|
||||
}
|
||||
else
|
||||
if (charset == nil)
|
||||
{
|
||||
charset = selectCharacterSet(content, &d);
|
||||
[hdr setParameter: charset forKey: @"charset"];
|
||||
|
|
Loading…
Reference in a new issue