Problema de carácter especial en el texto que se obtiene de CMS

I am using API to get data from CMS, we are displaying text what user has entered into CMS,

But my problem is when user enter some special character into CMS,I am not able to get those text on iphone side

Here is the link of text what user has entered in wall description enter image description here

We are using json web service, they are encode string to utf-8 so my json string will be

The word 'stop' isn\u0092t in your vocabulary. Run a marathon in 4.5 hours or less.

The utf character \u0092 is a special character we need to display same in shown in above image

NOTE: 1)if we pass string without encoding to utf-8 in webservice,I am getting whole string as null .

2)I have try with [NSString stringWithCString:[textFromCms cStringUsingEncoding:NSISOLatin1StringEncoding] encoding:NSUTF8StringEncoding]; where textFromCms is text I got from cms as show above.

3)I also try without any conversation/encoding ….it ignore the special character

4)also try with base64 but did not help that also.

Cualquier ayuda sería muy apreciado.

preguntado el 24 de agosto de 12 a las 07:08

How are you decoding the received JSON? -

I'm using inbuild json serialization NSDictionary *resDic = [[NSDictionary alloc] initWithDictionary:[NSJSONSerialization JSONObjectWithData:[request1 responseData] options:1 error:nil]]; -

1 Respuestas

The CMS apparently uses windows-1252, not UTF-8. The curly apostrophe is 92 (hex) in windows-1252, U+2019 in Unicode, so when properly encoded into JSON, it should be \2019.

Respondido 24 ago 12, 08:08

No es la respuesta que estás buscando? Examinar otras preguntas etiquetadas or haz tu propia pregunta.