开发者

it about hindi text proccessing in in linux using c++ [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.

Want to improve this question? Update the question so it focuses on one problem only by editing this post.

Closed 8 years ago.

开发者_JS百科 Improve this question

How to do processing on hindi text using c++ in linux any suggestions. I want to read a hindi text from file encoded in UTF-8 and process it that is to find a specific word from that . How can we do it??


The design of utf8 means that you don't have to take any special encoding specific steps. The C++ standard library functions that are based on char are all 8 bit clean, so they'll all work with utf-8 (except for esoteric environments where char isn't 8 bits).

std::string word = /*the word you are looking for, encoded in utf8*/;
std::string fileContents = /*the file contents*/;

std::string::iterator location = fileContents.find(word);
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜