[vdr] trouble with asprintf

Ludwig Nussel ludwig.nussel at suse.de
Mon Feb 11 09:11:20 CET 2008


Udo Richter wrote:
> Wolfgang Rohdewald wrote:
> > since asprintf leads to segfaults if feeded with incorrect UTF-8 characters,
> > I wanted to write a wrapper function which would then check the return value
> > of asprintf. 
> 
> I never understood what the problem is with utf8 and asprintf, since 
> utf8 is mostly ASCIIZ backwards compatible, and asprintf probably 
> doesn't even know the difference between utf8 and ascii. What special 
> handling does asprintf with utf8? Is there some example that causes the 
> trouble?

asprintf needs to check for multibyte characters to not cut them in
the middle and produce invalid output.

cu
Ludwig

-- 
 (o_   Ludwig Nussel
 //\   
 V_/_  http://www.suse.de/
SUSE LINUX Products GmbH, GF: Markus Rex, HRB 16746 (AG Nuernberg)







More information about the vdr mailing list