tags:

views:

56

answers:

1

Excuse my ignorance here but I know neither C++ nor GTK+.

Which String type is used when setting Strings in GTK+ widgets?

In .NET, Strings passed to a control are obviously .NET System.String. In Cocoa, Strings passed to a control are NSString. But I understand C++ does not have a standardized String type (but indeed several, depending on the library used).

So how are Strings passed to GTK+ widgets?

(I am thinking C Strings, but I want to know for sure.)

+2  A: 

All text in GTK+ is UTF-8-encoded, using char *, of course const where possible. Remember that GTK+ is implemented in C, so there is no use of STL for instance.

The underlying glib's character-set conversion documentation begins by stating:

Glib uses UTF-8 for its strings, and GUI toolkits like GTK+ that use Glib do the same thing.

unwind
I am assuming that this is true and it was pretty much what I expected. Ta.
Andrew J. Brehm