how to read hindi text from a file in c++? [duplicate]

不想你离开。 提交于 2019-12-25 04:39:22

问题


Possible Duplicate:
it about hindi text proccessing in in linux using c++

A file contains hindi text. I want to read this file and perform some operations on text it contains. So, if anyone could please explain how to read it from file and handle it(or just print it). Ex: if file contains

मै एक भारतीय हूँ।

then my program should read this content from file and print above text on standard output. I want to perform it on Linux.

Direct code will be more beneficial.


回答1:


Depends on the encoding. If your file is encoded in Unicode, you just have to use wide ANSI C functions (fwscanf, fgetwc and so on) you will be able to read any file in any language.



来源:https://stackoverflow.com/questions/3044170/how-to-read-hindi-text-from-a-file-in-c

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!