glib utf8 api
- From: Gregory Sharp <gregsharp geo yahoo com>
- To: gtk-devel-list gnome org
- Subject: glib utf8 api
- Date: Sun, 2 Mar 2008 14:49:45 -0800 (PST)
Hi, I'm new to glib, and have questions/comments about
the utf-8 API.
1) There seems to be no good way to strncpy a utf8 string
into a fixed buffer. g_strncpy doesn't work, because the
last character can get truncated causing an invalid string.
g_utf8_strncpy doesn't work either, because I don't know
how many characters fit in the buffer.
2) There seems to be no way to create a "best guess" valid
string. g_utf8_validate is nice and all, but if validation
fails I still need to create a valid string. Am I supposed
to use g_convert_with_fallback() from UTF-8 to UTF-8?
3) If validated utf8 strings are fundamentally different from
unvalidated strings, shouldn't they use a different C type?
4) What are the developers' reaction to camel_utf8_getc()
on this page: http://www.go-evolution.org/Camel.Misc
Please tell me if I'm missing something. I'm happy to
log bug reports as indicated.
Thanks,
Greg
Greg Sharp
gregsharp geocities com
____________________________________________________________________________________
Looking for last minute shopping deals?
Find them fast with Yahoo! Search. http://tools.search.yahoo.com/newsearch/category.php?category=shopping
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]