Multi Lang support C functions ?

S

Sriram

Hi,
I am writing an application in c. which
retrieves information stored in some conf. files
The application is a simple network agent. it communicates with
a remote network manager.

Suppose i have selected russian key board layout
and store some conf. in some files.

when i view them, i see some spl characters some info which i cant read.
some characters which i suppose it is in russian.

This is similar when i select french or german keyboard layout.

I want to read and write into these files.

The network manager sends me data in the exact same format as it is stored
into these conf. files.

My question is which "functions" i should use to read and write into these
files.

I am using Linux Operating System and C language.


I did try fgetws and fputws functions. but i am getting linker error
obviously these functions are not supported in my libc.


Also when i read the man pages for these functions. i read that
the behaviour of these functions are undefined if the file contains
null characters. i am not sure what are these "null" characters.

I am not sure if these are the functions i have to use.

I did try with fgets. i am able to print these characters. But problem is
the character value is showing some -ve value (such as -26) for some russian
character.

i am not sure if i have to use fgets and fputs.

similarly, should i pass any spl value to fopen.



Please advice.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,774
Messages
2,569,598
Members
45,152
Latest member
LorettaGur
Top