Answer the question
In order to leave comments, you need to log in
How to decode cyrillic that ctypes returns?
Here is the code:
mutable_string = create_string_buffer(str.encode(html))
tc.restype = c_char_p
tc.argtypes = [c_char_p]
print(' : ', tc(mutable_string).decode('utf-8'))
smatch parse_res;
regex re("(data-opp2)=\"(.+?)\"");
regex_search(string(html), parse_res, re);
printf("%s", string(parse_res[2]).c_str());
return string(parse_res[2]).c_str();
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question