On Mon, Nov 17, 2003 at 11:10:58AM -0800, Josh Coalson wrote: > > but there's still junk on the char* i get back from > > get_field_value(). > > there's no terminating null for these routines either, they > are returning the unterminated UTF-8 buffer just like the C > API.
OK. I assumed that stuff passed back to the user as char* would have been made to behave like a normal C string. > it's hard to do that without dealing with encodings right in the > metadata API. What about making them return wchar_t* and thus IMPLYING to the user that they have to do something about character conversion? > > > char str[entry->length+1]; > > > memcpy(str, entry->entry); > > > str[entry->length] = '\0'; > > > > That's about the size of what I've been doing. > > and that's working, right? (or at least it will for ASCII > tags) Yes. To convert, would i use iconv() or something like that? -- Joshua Kwan
pgp00000.pgp
Description: PGP signature
