- ((IrrlichtDevice*)scm_to_irr_pointer (device))->
- setWindowCaption (scm_to_wide_char_string (text));
+ wchar_t* wtext = (wchar_t*) scm_to_utf32_string (text);
+ ((IrrlichtDevice*)scm_to_irr_pointer (device))->setWindowCaption (wtext);
+ free (wtext);