|
Revision 406, 389 bytes
(checked in by astrange, 2 years ago)
|
Use the (LGPL) Mozilla automatic charset detection library for external subtitles.
Unfortunately, it's quite large...
References #87
|
| Line | |
|---|
| 1 |
#import <Cocoa/Cocoa.h> |
|---|
| 2 |
|
|---|
| 3 |
|
|---|
| 4 |
@interface UniversalDetector:NSObject |
|---|
| 5 |
{ |
|---|
| 6 |
void *detectorptr; |
|---|
| 7 |
NSString *charset; |
|---|
| 8 |
float confidence; |
|---|
| 9 |
} |
|---|
| 10 |
|
|---|
| 11 |
-(id)init; |
|---|
| 12 |
-(void)dealloc; |
|---|
| 13 |
|
|---|
| 14 |
-(void)analyzeData:(NSData *)data; |
|---|
| 15 |
-(void)analyzeBytes:(const char *)data length:(int)len; |
|---|
| 16 |
-(void)reset; |
|---|
| 17 |
|
|---|
| 18 |
-(BOOL)done; |
|---|
| 19 |
-(NSString *)MIMECharset; |
|---|
| 20 |
-(NSStringEncoding)encoding; |
|---|
| 21 |
-(float)confidence; |
|---|
| 22 |
|
|---|
| 23 |
+(UniversalDetector *)detector; |
|---|
| 24 |
|
|---|
| 25 |
@end |
|---|