Main Page | File List | File Members

example.c File Reference

#include <stdio.h>
#include <string.h>
#include <librcd.h>

Functions

 main ()

Function Documentation

main  ) 
 

00005        {
00006     rcd_russian_charset res;
00007     char buf[255];
00008     int l;
00009     
00010     while (fgets(buf,255,stdin)) {
00011         if (strlen(buf)<2) break;
00012         
00013         res = rcdGetRussianCharset(buf,0);
00014         switch(res) {
00015             case RUSSIAN_CHARSET_WIN:
00016                 printf("CP1251: ");
00017             break;
00018             case RUSSIAN_CHARSET_ALT:
00019                 printf("CP866 : ");
00020             break;
00021             case RUSSIAN_CHARSET_KOI:
00022                 printf("KOI8-R: ");
00023             break;
00024             case RUSSIAN_CHARSET_UTF8:
00025                 printf("UTF8  : ");
00026             break;
00027         }
00028         printf("%s",buf);
00029         if (buf[strlen(buf)-1]!='\n') printf("\n");
00030     }
00031 }


Generated on Wed Jul 20 15:19:45 2005 for LibRCC by doxygen 1.3.3