00001 #include "cgi.h"
00002
00003 int CGImain(char * argv0,CGINameValue* Params,STREAM htmlout)
00004 {
00005 char* report = "test.rep";
00006 char unicode[32];
00007 CGINameValue * nvp ;
00008 FILE* f ;
00009 char* c;
00010
00011 printf("1=%d\n",
00012 ContainsANSIChars("He said, \x93how do you do?\x94") );
00013 c = ANSItoUTF8("He \xB1""5\xB5 said, \x93how do you do?\x94");
00014 printf("0=%d\n", ContainsANSIChars(c) );
00015 HTMLEscape(htmlout,c);
00016 printf("\n%s\n",c);
00017 free(c);
00018
00019 nvp =
00020 ReadPairedString("Shanti,Martha",',',0);
00021
00022 printf("%s %s",nvp[0].name,nvp[1].name);
00023 DeleteNVP(nvp);
00024
00025 nvp =
00026 ReadPairedString("Q1=x,GOOD=Yes,BAD=No,NUMBER=2,NAME=Shanti",',',0);
00027 f = fopen(report,"rt");
00028
00029 printf("%d\n",strcmp("20051112","20051113"));
00030 memset(unicode,0,sizeof(unicode));
00031 int16ToUTF8(0x03cb,unicode);
00032 int16ToUTF8(0x03cc,unicode+strlen(unicode));
00033
00034
00035 HTMLEscape(htmlout,unicode);
00036 SetFieldValue(nvp,"Q1",unicode);
00037
00038 if (!f)
00039 printf("Can't open %s",report);
00040 else
00041 {
00042 RunReport(argv0,htmlout, f,nvp,0,0,1,0);
00043 fclose(f);
00044 }
00045 DeleteNVP(nvp);
00046 return 0;
00047 }
Raosoft EZReport, EZSurvey, InterForm, RapidReport, Raosoft, and SurveyWin
are registered trademarks of Raosoft, Inc.
Page contents © 1996-2007 by Raosoft, Inc.
You may use and modify this file for your own use, but may not distribute
it or derivative works without the prior written consent of Raosoft, Inc.
This software is provided "as is," and Raosoft makes no warranty, express
or implied, of fitness for a particular application. Every measure has been
taken to anticipate risks inherent to computer networks, but we cannot
guarantee safety or reliability of this program in every situation.
Tel: 206-525-4025 (US) Email: raosoft@raosoft.com
http://www.raosoft.com/