handling special characters in AIX with C - Aix

This is a discussion on handling special characters in AIX with C - Aix ; Hi, I have this host which sends a text file in UTF-8 via ftp. But when my program reads the file in AIX, it is not able to handle the German umlaut character which is in the file. My ...

+ Reply to Thread
Results 1 to 5 of 5

Thread: handling special characters in AIX with C

  1. handling special characters in AIX with C

    Hi,

    I have this host which sends a text file in UTF-8 via ftp. But when my
    program reads the file in AIX, it is not able to handle the German
    umlaut character which is in the file.
    My program is in C. I am using AIX 4. The program opens the text file
    and reads each character using fscanf(fp,"%c",&inChar) where fp is the
    file pointer and inChar is the variable into which each character is
    stored.

    Any Idea how I can rectify this?

  2. Re: handling special characters in AIX with C

    avikrc18@gmail.com wrote:
    > Hi,
    >
    > I have this host which sends a text file in UTF-8 via ftp. But when my
    > program reads the file in AIX, it is not able to handle the German
    > umlaut character which is in the file.
    > My program is in C. I am using AIX 4. The program opens the text file
    > and reads each character using fscanf(fp,"%c",&inChar) where fp is the
    > file pointer and inChar is the variable into which each character is
    > stored.
    >
    > Any Idea how I can rectify this?



    3 obvious solutions:
    - make people send a data file which your program can handle
    - get gnu recode and convert the data file before running your program
    - rewrite your program to handle "multibyte character sets". not sure if
    there is an adequate compiler and libraries for the outdated aix 4, though.

    regards
    Joachim Gann

  3. Re: handling special characters in AIX with C

    avikrc18@gmail.com wrote:

    > Hi,
    >
    > I have this host which sends a text file in UTF-8 via ftp. But when my
    > program reads the file in AIX, it is not able to handle the German
    > umlaut character Ä which is in the file.
    > My program is in C. I am using AIX 4. The program opens the text file
    > and reads each character using fscanf(fp,"%c",&inChar) where fp is the
    > file pointer and inChar is the variable into which each character is
    > stored.
    >
    > Any Idea how I can rectify this?


    Perhaps after receiving the file you can run it through "tr" and translate
    the identified character(s) into another character that you can process
    correctly. Use command man tr for details and outputfile when
    you run it.

    Good luck.


  4. Re: handling special characters in AIX with C

    On Nov 10, 1:54*am, Bob M wrote:
    > avikr...@gmail.com wrote:
    > > Hi,

    >
    > > I have this host which sends a text file in UTF-8 via ftp. But when my
    > > program reads the file in AIX, it is not able to handle the German
    > > umlaut character which is in the file.
    > > My program is in C. I am using AIX 4. The program opens the text file
    > > and reads each character using fscanf(fp,"%c",&inChar) where fp is the
    > > file pointer and inChar is the variable into which each character is
    > > stored.

    >
    > > Any Idea how I can rectify this?

    >
    > Perhaps after receiving the file you can run it through "tr" and translate
    > the identified character(s) into another character that you can process
    > correctly. *Use command man tr for details and outputfile when
    > you run it.
    >
    > Good luck.


    Perhaps you can try using the wide-character or multi-byte input
    routines.

    Thanks and regards,
    Rajbir Bhattacharjee

  5. Re: handling special characters in AIX with C

    Maybe the iconv routines will help... man -k iconv...

    -Mike

+ Reply to Thread