| 130 | | if (!res) Codecprintf(NULL,"Failed to load file as guessed encoding %s.\n",[enc_str UTF8String]); |
|---|
| | 130 | if (!res) { |
|---|
| | 131 | if (latin2) { |
|---|
| | 132 | Codecprintf(NULL,"Encoding %s failed, retrying.\n",[enc_str UTF8String]); |
|---|
| | 133 | enc = (enc == NSWindowsCP1252StringEncoding) ? NSWindowsCP1250StringEncoding : NSWindowsCP1252StringEncoding; |
|---|
| | 134 | res = [[[NSString alloc] initWithData:data encoding:enc] autorelease]; |
|---|
| | 135 | if (!res) Codecprintf(NULL,"Both of latin1/2 failed.\n",[enc_str UTF8String]); |
|---|
| | 136 | } else Codecprintf(NULL,"Failed to load file as guessed encoding %s.\n",[enc_str UTF8String]); |
|---|
| | 137 | } |
|---|