Oolite 1.91.0.7646-241128-10e222e
Loading...
Searching...
No Matches
OOEncodingConverter.h File Reference
import "OOCocoa.h"
+ Include dependency graph for OOEncodingConverter.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  OOEncodingConverter
 

Functions

NSString * StringFromEncoding (NSStringEncoding encoding)
 
NSStringEncoding EncodingFromString (NSString *name)
 

Function Documentation

◆ EncodingFromString()

NSStringEncoding EncodingFromString ( NSString * name)

Definition at line 249 of file OOEncodingConverter.m.

250{
251 if ([name isEqualToString:kWindowsLatin1Str]) return NSWindowsCP1252StringEncoding;
252 if ([name isEqualToString:kWindowsLatin2Str]) return NSWindowsCP1250StringEncoding;
253 if ([name isEqualToString:kWindowsCyrillicStr]) return NSWindowsCP1251StringEncoding;
254 if ([name isEqualToString:kWindowsGreekStr]) return NSWindowsCP1253StringEncoding;
255 if ([name isEqualToString:kWindowsTurkishStr]) return NSWindowsCP1254StringEncoding;
256 return (NSStringEncoding)NSNotFound;
257}
#define kWindowsCyrillicStr
#define kWindowsLatin1Str
#define kWindowsLatin2Str
#define kWindowsGreekStr
#define kWindowsTurkishStr

◆ StringFromEncoding()

NSString * StringFromEncoding ( NSStringEncoding encoding)

Definition at line 224 of file OOEncodingConverter.m.

225{
226 switch (encoding)
227 {
228 case NSWindowsCP1252StringEncoding:
229 return kWindowsLatin1Str;
230
231 case NSWindowsCP1250StringEncoding:
232 return kWindowsLatin2Str;
233
234 case NSWindowsCP1251StringEncoding:
235 return kWindowsCyrillicStr;
236
237 case NSWindowsCP1253StringEncoding:
238 return kWindowsGreekStr;
239
240 case NSWindowsCP1254StringEncoding:
241 return kWindowsTurkishStr;
242
243 default:
244 return nil;
245 }
246}
return nil

References kWindowsCyrillicStr, kWindowsGreekStr, kWindowsLatin1Str, kWindowsLatin2Str, kWindowsTurkishStr, and nil.