UTF-8 support in GTK+ 1.3.5

Hi all,

	Does anyone know if GTK+ 1.3.5 completely support UTF-8?

	I'm asking because I tried this snippet of code and it works, but
if you remove the "//" comments (and comment out the corresponding lines
after), it doesn't appear.  Is it something I've done wrong either in the
code or my installation of 1.3.5...  I'm not getting any runtime errors,
too (so it must be a valid UTF character).

	Thank you!



#include <gtk/gtk.h>

int main (int argc, char **argv) {
  GtkWidget *text_buffer;
  GtkWidget *window;

  //  char buf[4] = {0xe2, 0x86, 0xb5, '\0'};
  char buf[3] = { 0xc2, 0xac, '\0' };

  gtk_init (&argc, &argv);

  text_buffer = gtk_text_view_new ();

  //  gtk_text_buffer_insert_at_cursor (gtk_text_view_get_buffer
(GTK_TEXT_VIEW (text_buffer)), buf, 3);
  gtk_text_buffer_insert_at_cursor (gtk_text_view_get_buffer
(GTK_TEXT_VIEW (text_buffer)), buf, 2);

  window = gtk_window_new (GTK_WINDOW_TOPLEVEL);

  gtk_container_add (GTK_CONTAINER (window), text_buffer);

  gtk_window_set_default_size (GTK_WINDOW (window), 100, 100);
  gtk_widget_show_all (window);

  gtk_main ();

  return 0;

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]