问题
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