i'm trying to convert the contents of an XML file (that is encoded in UTF-8) into data... everything works fine if the characters of the file are english, but this code seems to be double encoding if the characters of the file are in anything but (IE Japanease or french, etc.)
for for example... i will input this XML file into my app, the NSLog returns unexpected results:
Input:
<key>Name</key>
<string>槇原敬之</string>
Output:
<key>Name</key>
<string>ÊßáÂéüÊï¨πã</string>
what should i do?
Code:
- (BOOL)performDragOperation:(id <NSDraggingInfo>)sender
{
NSPasteboard *pboard = [sender draggingPasteboard];
NSString *dropedFilePath = [[pboard propertyListForType:NSFilenamesPboardType] objectAtIndex:0];
NSString *droppedFileContents = [NSString stringWithContentsOfFile:dropedFilePath];
AquaticPrime *licenseValidator = [AquaticPrime aquaticPrimeWithKey:key];
NSData *licenseData = [droppedFileContents [B]dataUsingEncoding:NSUnicodeStringEncoding[/B]];
NSDictionary *licenseDictionary = [licenseValidator dictionaryForLicenseData:licenseData];
for for example... i will input this XML file into my app, the NSLog returns unexpected results:
Input:
<key>Name</key>
<string>槇原敬之</string>
Output:
<key>Name</key>
<string>ÊßáÂéüÊï¨πã</string>
what should i do?