[xml] encoding question



Hi,

My problem definition is as follows:

I am posting an XML file (UTF-8 encoded) to a
cgi-script. This script, on reciving the request,
parses the xml document. An element tag in this file
contains some hex numbers.

<Block>x76\x81\x41\x6\xf\x83\xb5\x61\x1\x8\xcb\xda\x81
\x13\x6\x62\xfa\x1\xb\xa\xe0\x45\x82\x7\xb\x58
\x5e</Block>

I extracted these hex numbers using the function
xmlListNodeGetString(). The problem starts from here.
The hex numbers that i get are not similar to the hex
numbers i had send. I tried to print these numbers
using 
for(i=0; i<stringlength; i++)
    printf("\\x%x",string[i]);
but when i use the above code at the client side i am
getting the right answer. When i print them using
    printf("%s",string);
at the server side i get the right numbers. 

It would be great help if anyone of you could sove
this problem.
Sorry if the question is a dumb one.

Taha Arif Ali,
karachi,
Pakistan


        
        
                
___________________________________________________________ 
Yahoo! Messenger - NEW crystal clear PC to PC calling worldwide with voicemail http://uk.messenger.yahoo.com



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]