R
ramyakrishnakumar
Hi All,
I am facing some problem with basic file operation...
I have one xml file looks like
<?xml version="1.0" encoding="UTF-8" standalone="no" ?>
<x:recording>
<udf3>Gélin</udf3>
</x:recording>
My code is like it will read this file and store it into one string
and will call one Database Stored procedure to parse the xml and store
it into some tables.
eg:
FILE * file = fopen("testFile.xml","r+b");
struct _stat buffer;
int result1 = _stat( "testFile.xml", &buffer );
int size = buffer.st_size;
char *temp = new char [(sizeof(char))*(size+1)];
fread(temp,sizeof(char),size,file);
pass this temp to Ado for SP execution.
Problem:
you can see the xml file has one higherorderASCII character' é '
this going to the SP as wrong character 'é '
While debugging the code as well I can see the temp is having this
wrong value.
I reading in the binary mode but still why this problem is happening.
Can you please help me to resolve that
I am facing some problem with basic file operation...
I have one xml file looks like
<?xml version="1.0" encoding="UTF-8" standalone="no" ?>
<x:recording>
<udf3>Gélin</udf3>
</x:recording>
My code is like it will read this file and store it into one string
and will call one Database Stored procedure to parse the xml and store
it into some tables.
eg:
FILE * file = fopen("testFile.xml","r+b");
struct _stat buffer;
int result1 = _stat( "testFile.xml", &buffer );
int size = buffer.st_size;
char *temp = new char [(sizeof(char))*(size+1)];
fread(temp,sizeof(char),size,file);
pass this temp to Ado for SP execution.
Problem:
you can see the xml file has one higherorderASCII character' é '
this going to the SP as wrong character 'é '
While debugging the code as well I can see the temp is having this
wrong value.
I reading in the binary mode but still why this problem is happening.
Can you please help me to resolve that