#include <wchar.h>
#include "wchar.h"
-wchar_t*
+SCM
+scm_from_wide_char_string (const wchar_t* wtext)
+{
+ size_t nbytes = wcslen (wtext) + 1;
+ char* ctext = (char*)malloc (nbytes);
+ wcstombs (ctext, wtext, nbytes);
+ return scm_from_utf8_string (ctext);
+}
+
+const wchar_t*
scm_to_wide_char_string (SCM text)
{
char* ctext = scm_to_utf8_stringn (text, NULL);