tags:

views:

48

answers:

1

Hi all, I am developing an application in cocoa which needs to read the iTunes XML file.I successfully parsed the xml file but i am facing a critical problem in reading files with special character . In iTunes xml file a file name is written as

"123-123 Daddy Cool Daddy Coool - www.123musiq.com - %C2%AE Riya collections %C2%AE.mp3"

Its original form is

123-123 Daddy Cool Daddy Coool - www.123musiq.com - ® Riya collections ®.mp3

Because of this my application crashes while checking whether the file exists at that location.

Looking for a solution....

A: 
NSString* filename = [(NSString*)CFURLCreateStringByReplacingPercentEscapes(
                                     kCFAllocatorDefault,
                                     (CFStringRef)nameFromXML,
                                     CFSTR("")) autorelease];
Nikolai Ruhe