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

2019-09-06 14:27发布

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.

标签: c++ hindi
1条回答
Juvenile、少年°
2楼-- · 2019-09-06 15:16

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.

查看更多
登录 后发表回答