utf-8 and TextView usage



how to get the contents of a TextView object? I've tried to assign textview.get_buffer() to a string variable but had no fortune, then I tried to assign textbuffer->get_text(0) and it worked. is this the only way to do it?

I've checked the reference that textbuffer->get_text(0) returns a UTF-8 string, so I used a ustring variable to carry the returned value, however it didn't print out chinese when I cout the value of the variable in gnome terminal. Then I tried to declare the variable as a std::string, and chinese showed up in the terminal. Can anyone tell me why it didn't work why the variable was declared as a ustring?

--
Dell Inspiron 600m
Pentium-M 1.6G
512MB, 60G
ATI 9000 Mobility

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