ios - Replacing some characters in a NSString -
i have xml file encoded in windows-1252 , haven't found method proper utf-8 encoding file far. it's file containing lot of accented characters need display.
what want do, replace encoding windows-1252 character myself. know how :
nsstring * eat = @"j'ai mangu00c8 une pomme"; to
nsstring neweat = @"j'ai mangé une pomme"; i found many ways replace character not in word, need here replace characters (so here u00c8) can anywhere in given string.
decoding not giving proper result try
nsstring * eat = @"j'ai mangu00c8 une pomme"; eat = [eat stringbyreplacingoccurrencesofstring:@"u00c8" withstring:@"é"];
Comments
Post a Comment