-->

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

2019-09-06 14: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.



标签: c++ hindi