hi

i am using PDI to create VCARD object
in normal conditions (entries are ascii) everything works

to write address part i use this code

if(data->addr1)
        temp[0]=data->addr1;
else    
        temp[0]="";

if(data->addr2)
        temp[1]=data->addr2;
else    
        temp[1]="";

if(data->street)
        temp[2]=data->street;
else    
        temp[2]="";

if(data->town)
        temp[3]=data->town;
else    
        temp[3]="";

if(data->district)
        temp[4]=data->district;
else    
        temp[4]="";

if(data->zip)
        temp[5]=data->zip;
else    
        temp[5]="";

if(data->country)
        temp[6]=data->country;
else    
        temp[6]="";

err=PdiWriteProperty(libref,writer,kPdiPRN_ADR);
if(!err)
        err=PdiWriteParameter(libref,writer,kPdiPAV_TYPE_POSTAL,false);
if(!err)
        err=PdiWritePropertyFields(libref,writer,temp,7,kPdiWriteText);

usually it works, but in one test case data->street points to text which has
non-ascii value in it. non ascii value in this special case is german letter 
"ß".

if i write it everything seems to behave normally but much later application
crashes in function which normally works without any problem and is completely
unrelated to vcard. to me it looks like some sort of stack  or data corruption

because it looked like an issue caused by non-ascii character inn text i started
to experiment with                              
err=PdiSetCharset(libref,writer,charEncodingCP1252);
and
err=PdiSetEncoding(libref,writer,kPdiNoEncoding); //i tried also all other 
variants

nothing helped.

so my question is, did anyone worked with pdi library and has any idea what is
wrong and how can i fix or workaround the issue?

thanks in advance


-- 
For information on using the ACCESS Developer Forums, or to unsubscribe, please 
see http://www.access-company.com/developers/forums/

Reply via email to