Added setDefaultEncoding:

This is needed in GSWeb if you use utf-8 and faster than using a
String as encoding name.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@20893 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
dwetzel 2005-03-11 09:12:53 +00:00
parent 9516f670eb
commit fb8158c3c5
2 changed files with 12 additions and 0 deletions

View file

@ -202,6 +202,8 @@
- (NSString*) scanToken: (NSScanner*)scanner;
- (void) setBuggyQuotes: (BOOL)flag;
- (void) setDefaultCharset: (NSString*)aName;
- (void) setDefaultEncoding: (NSStringEncoding)encoding;
- (void) setIsHttp;
@end

View file

@ -1950,6 +1950,16 @@ NSDebugMLLog(@"GSMime", @"Header parsed - %@", info);
_defaultEncoding = [GSMimeDocument encodingFromCharset: aName];
}
/**
* Method to inform the parser that body parts with no content-type
* header (which are treated as text/plain) should use the specified
* NSStringEncoding rather than the default
*/
- (void) setDefaultEncoding: (NSStringEncoding)encoding
{
_defaultEncoding = encoding;
}
/**
* Method to inform the parser that the data it is parsing is an HTTP
* document rather than true MIME. This method is called internally