F
F
Flie2014-08-16 11:18:48
Cocoa
Flie, 2014-08-16 11:18:48

How to change NSString encoding after HTML parsing?

DVS, everyone!
I found an HTML parser on GitHub ( Objective-C-HMTL-Parser ), built it into my project, then I get the page, parse it, I get

[div contents] //(комент от автора) Returns the plaintext contents of node
and as a result I get something like this: "\U0418\U043d\U0441\U0442\U0440\U0443\U043c\U0435\U043d\U0442" Tell me
how to translate everything into readable text (The site has Win-1251 encoding, if it matters )

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
deleted-mezhevikin, 2014-08-16
@deleted-mezhevikin

You need to convert at the stage of translating NSData to NSString

NSString *html = [[NSString alloc] initWithData:data encoding:NSWindowsCP1251StringEncoding];

Similar questions

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question