
--------------------------------------------------------------
--# UTF 8
--------------------------------------------------------------

include GtkEngine.e

constant win = create(GtkWindow,"size=300x100,position=1,border_width=10,$destroy=Quit")

constant panel = create(GtkBox,"orientation=VERTICAL")
    add(win,panel)

-- the hard way:
constant lbl1 = create(GtkLabel,"Gr\xC3\xBC\xC3\x9F Gott - escaped UTF-8: \xC2\xA9")
    add(panel,lbl1)

-- easier - pasted from text editor or web page:
constant lbl2 = create(GtkLabel,"Fußbälle - direct UTF-8: ©")
    add(panel,lbl2)

-- using Eu's UTF string notation;
constant lbl3 = create(GtkLabel,u"47 72 C3 BC C3 9F 20 47 6F 74 74 C2 A9")
    add(panel,lbl3)

constant inp = create(GtkEntry,{
    {"text","\xC8\xAB \xDB\x9E \xE1\x8E\xBA"},
    {"font","mono 28"},
    {"alignment",1}})
    add(panel,inp)

constant btnbox = create(GtkButtonBox)
    pack(panel,-btnbox)

constant btn1 = create(GtkButton,"gtk-quit","Quit")
    set(btnbox,"margin top",10)
    add(btnbox,{btn1})

show_all(win)
main()


