39B17942.3050906@bitbuilder.com">I've ran into this problem
a few times so I decided to fix it and send it in. I though something like
this would be found in glib, but I didn't find it anywhere. gtkhtml uses
libwww and it's a big mess for what I wanted to do.
So
gchar* url_encode( gchar* source )
source : The raw URL string.
returns: A new allocated URL encoded string, must free with g_free when done.
This function follows RFC 2396 (Query Component)
Example:
tts = g_strdup("www.BitBuilder.com/query.php?text=Abbas Bin Fernas, huh?" );
tts = url_encode( tts );
g_print("%s\n", tts);
g_free( tts );