Index: gnucash-2.4.7/src/import-export/aqbanking/Makefile.am
===================================================================
--- gnucash-2.4.7.orig/src/import-export/aqbanking/Makefile.am
+++ gnucash-2.4.7/src/import-export/aqbanking/Makefile.am
@@ -45,6 +45,7 @@ libgncmod_aqbanking_la_LIBADD = \
   ${GNOME_LIBS} \
   ${GLADE_LIBS} \
   ${GLIB_LIBS} \
+  ${GUILE_LIBS} \
   ${GWENGUI_GTK2_LIBS} \
   ${AQBANKING_LIBS}
 
@@ -64,6 +65,7 @@ AM_CFLAGS = \
   ${GNOME_CFLAGS} \
   ${GLADE_CFLAGS} \
   ${GLIB_CFLAGS} \
+  ${GUILE_INCS} \
   ${AQBANKING_CFLAGS}
 
 uidir = $(GNC_UI_DIR)
Index: gnucash-2.4.7/src/guile-mappings.h
===================================================================
--- gnucash-2.4.7.orig/src/guile-mappings.h
+++ gnucash-2.4.7/src/guile-mappings.h
@@ -17,7 +17,7 @@
  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.        *
 \********************************************************************/
 
-#include <libguile/version.h> /* for SCM_MAJOR_VERSION etc */
+#include <libguile.h> /* for SCM_MAJOR_VERSION etc */
 
 /* Give Guile 1.6 and 1.8 a 2.0-like interface */
 #if (SCM_MAJOR_VERSION == 1) && (SCM_MINOR_VERSION <= 6)
Index: gnucash-2.4.7/src/plugins/bi_import/Makefile.am
===================================================================
--- gnucash-2.4.7.orig/src/plugins/bi_import/Makefile.am
+++ gnucash-2.4.7/src/plugins/bi_import/Makefile.am
@@ -29,7 +29,8 @@ libgncmod_bi_import_la_LIBADD = \
   ${GNOME_LIBS} \
   ${GLADE_LIBS} \
   ${QOF_LIBS} \
-  ${GLIB_LIBS}
+  ${GLIB_LIBS} \
+  ${GUILE_LIBS}
 
 AM_CFLAGS = \
   -I${top_srcdir}/src \
@@ -52,6 +53,7 @@ AM_CFLAGS = \
   ${GNOME_CFLAGS} \
   ${GLADE_CFLAGS} \
   ${QOF_CFLAGS} \
-  ${GLIB_CFLAGS}
+  ${GLIB_CFLAGS} \
+  ${GUILE_INCS}
 
 INCLUDES = -DG_LOG_DOMAIN=\"gnc.plugin.bi_import\"
Index: gnucash-2.4.7/src/app-utils/swig-app-utils.c
===================================================================
--- gnucash-2.4.7.orig/src/app-utils/swig-app-utils.c
+++ gnucash-2.4.7/src/app-utils/swig-app-utils.c
@@ -771,7 +771,7 @@ static swig_module_info *SWIG_Guile_GetM
 SWIGINTERN char *
 SWIG_Guile_scm2newstr(SCM str, size_t *len) {
 #define FUNC_NAME "SWIG_Guile_scm2newstr"
-  char *ret;
+  char *ret, *tmp;
   size_t l;
 
   SCM_ASSERT (SCM_STRINGP(str), str, 1, FUNC_NAME);
@@ -780,7 +780,9 @@ SWIG_Guile_scm2newstr(SCM str, size_t *l
   ret = (char *) SWIG_malloc( (l + 1) * sizeof(char));
   if (!ret) return NULL;
 
-  memcpy(ret, SCM_STRING_CHARS(str), l);
+  tmp = scm_to_utf8_string(str);
+  memcpy(ret, tmp, l);
+  free(tmp);
   ret[l] = '\0';
   if (len) *len = l;
   return ret;
Index: gnucash-2.4.7/src/business/dialog-tax-table/swig-dialog-tax-table.c
===================================================================
--- gnucash-2.4.7.orig/src/business/dialog-tax-table/swig-dialog-tax-table.c
+++ gnucash-2.4.7/src/business/dialog-tax-table/swig-dialog-tax-table.c
@@ -771,7 +771,7 @@ static swig_module_info *SWIG_Guile_GetM
 SWIGINTERN char *
 SWIG_Guile_scm2newstr(SCM str, size_t *len) {
 #define FUNC_NAME "SWIG_Guile_scm2newstr"
-  char *ret;
+  char *ret, *tmp;
   size_t l;
 
   SCM_ASSERT (SCM_STRINGP(str), str, 1, FUNC_NAME);
@@ -780,7 +780,9 @@ SWIG_Guile_scm2newstr(SCM str, size_t *l
   ret = (char *) SWIG_malloc( (l + 1) * sizeof(char));
   if (!ret) return NULL;
 
-  memcpy(ret, SCM_STRING_CHARS(str), l);
+  tmp = scm_to_utf8_string(str);
+  memcpy(ret, tmp, l);
+  free(tmp);
   ret[l] = '\0';
   if (len) *len = l;
   return ret;
Index: gnucash-2.4.7/src/core-utils/swig-core-utils.c
===================================================================
--- gnucash-2.4.7.orig/src/core-utils/swig-core-utils.c
+++ gnucash-2.4.7/src/core-utils/swig-core-utils.c
@@ -771,7 +771,7 @@ static swig_module_info *SWIG_Guile_GetM
 SWIGINTERN char *
 SWIG_Guile_scm2newstr(SCM str, size_t *len) {
 #define FUNC_NAME "SWIG_Guile_scm2newstr"
-  char *ret;
+  char *ret, *tmp;
   size_t l;
 
   SCM_ASSERT (SCM_STRINGP(str), str, 1, FUNC_NAME);
@@ -780,7 +780,9 @@ SWIG_Guile_scm2newstr(SCM str, size_t *l
   ret = (char *) SWIG_malloc( (l + 1) * sizeof(char));
   if (!ret) return NULL;
 
-  memcpy(ret, SCM_STRING_CHARS(str), l);
+  tmp = scm_to_utf8_string(str);
+  memcpy(ret, tmp, l);
+  free(tmp);
   ret[l] = '\0';
   if (len) *len = l;
   return ret;
Index: gnucash-2.4.7/src/engine/swig-business-core.c
===================================================================
--- gnucash-2.4.7.orig/src/engine/swig-business-core.c
+++ gnucash-2.4.7/src/engine/swig-business-core.c
@@ -771,7 +771,7 @@ static swig_module_info *SWIG_Guile_GetM
 SWIGINTERN char *
 SWIG_Guile_scm2newstr(SCM str, size_t *len) {
 #define FUNC_NAME "SWIG_Guile_scm2newstr"
-  char *ret;
+  char *ret, *tmp;
   size_t l;
 
   SCM_ASSERT (SCM_STRINGP(str), str, 1, FUNC_NAME);
@@ -780,7 +780,9 @@ SWIG_Guile_scm2newstr(SCM str, size_t *l
   ret = (char *) SWIG_malloc( (l + 1) * sizeof(char));
   if (!ret) return NULL;
 
-  memcpy(ret, SCM_STRING_CHARS(str), l);
+  tmp = scm_to_utf8_string(str);
+  memcpy(ret, tmp, l);
+  free(tmp);
   ret[l] = '\0';
   if (len) *len = l;
   return ret;
Index: gnucash-2.4.7/src/engine/swig-engine.c
===================================================================
--- gnucash-2.4.7.orig/src/engine/swig-engine.c
+++ gnucash-2.4.7/src/engine/swig-engine.c
@@ -771,7 +771,7 @@ static swig_module_info *SWIG_Guile_GetM
 SWIGINTERN char *
 SWIG_Guile_scm2newstr(SCM str, size_t *len) {
 #define FUNC_NAME "SWIG_Guile_scm2newstr"
-  char *ret;
+  char *ret, *tmp;
   size_t l;
 
   SCM_ASSERT (SCM_STRINGP(str), str, 1, FUNC_NAME);
@@ -780,7 +780,9 @@ SWIG_Guile_scm2newstr(SCM str, size_t *l
   ret = (char *) SWIG_malloc( (l + 1) * sizeof(char));
   if (!ret) return NULL;
 
-  memcpy(ret, SCM_STRING_CHARS(str), l);
+  tmp = scm_to_utf8_string(str);
+  memcpy(ret, tmp, l);
+  free(tmp);
   ret[l] = '\0';
   if (len) *len = l;
   return ret;
Index: gnucash-2.4.7/src/gnc-module/swig-gnc-module.c
===================================================================
--- gnucash-2.4.7.orig/src/gnc-module/swig-gnc-module.c
+++ gnucash-2.4.7/src/gnc-module/swig-gnc-module.c
@@ -771,7 +771,7 @@ static swig_module_info *SWIG_Guile_GetM
 SWIGINTERN char *
 SWIG_Guile_scm2newstr(SCM str, size_t *len) {
 #define FUNC_NAME "SWIG_Guile_scm2newstr"
-  char *ret;
+  char *ret, *tmp;
   size_t l;
 
   SCM_ASSERT (SCM_STRINGP(str), str, 1, FUNC_NAME);
@@ -780,7 +780,9 @@ SWIG_Guile_scm2newstr(SCM str, size_t *l
   ret = (char *) SWIG_malloc( (l + 1) * sizeof(char));
   if (!ret) return NULL;
 
-  memcpy(ret, SCM_STRING_CHARS(str), l);
+  tmp = scm_to_utf8_string(str);
+  memcpy(ret, tmp, l);
+  free(tmp);
   ret[l] = '\0';
   if (len) *len = l;
   return ret;
Index: gnucash-2.4.7/src/gnc-module/test/mod-bar/swig-bar.c
===================================================================
--- gnucash-2.4.7.orig/src/gnc-module/test/mod-bar/swig-bar.c
+++ gnucash-2.4.7/src/gnc-module/test/mod-bar/swig-bar.c
@@ -771,7 +771,7 @@ static swig_module_info *SWIG_Guile_GetM
 SWIGINTERN char *
 SWIG_Guile_scm2newstr(SCM str, size_t *len) {
 #define FUNC_NAME "SWIG_Guile_scm2newstr"
-  char *ret;
+  char *ret, *tmp;
   size_t l;
 
   SCM_ASSERT (SCM_STRINGP(str), str, 1, FUNC_NAME);
@@ -780,7 +780,9 @@ SWIG_Guile_scm2newstr(SCM str, size_t *l
   ret = (char *) SWIG_malloc( (l + 1) * sizeof(char));
   if (!ret) return NULL;
 
-  memcpy(ret, SCM_STRING_CHARS(str), l);
+  tmp = scm_to_utf8_string(str);
+  memcpy(ret, tmp, l);
+  free(tmp);
   ret[l] = '\0';
   if (len) *len = l;
   return ret;
Index: gnucash-2.4.7/src/gnc-module/test/mod-baz/swig-baz.c
===================================================================
--- gnucash-2.4.7.orig/src/gnc-module/test/mod-baz/swig-baz.c
+++ gnucash-2.4.7/src/gnc-module/test/mod-baz/swig-baz.c
@@ -771,7 +771,7 @@ static swig_module_info *SWIG_Guile_GetM
 SWIGINTERN char *
 SWIG_Guile_scm2newstr(SCM str, size_t *len) {
 #define FUNC_NAME "SWIG_Guile_scm2newstr"
-  char *ret;
+  char *ret, *tmp;
   size_t l;
 
   SCM_ASSERT (SCM_STRINGP(str), str, 1, FUNC_NAME);
@@ -780,7 +780,9 @@ SWIG_Guile_scm2newstr(SCM str, size_t *l
   ret = (char *) SWIG_malloc( (l + 1) * sizeof(char));
   if (!ret) return NULL;
 
-  memcpy(ret, SCM_STRING_CHARS(str), l);
+  tmp = scm_to_utf8_string(str);
+  memcpy(ret, tmp, l);
+  free(tmp);
   ret[l] = '\0';
   if (len) *len = l;
   return ret;
Index: gnucash-2.4.7/src/gnc-module/test/mod-foo/swig-foo.c
===================================================================
--- gnucash-2.4.7.orig/src/gnc-module/test/mod-foo/swig-foo.c
+++ gnucash-2.4.7/src/gnc-module/test/mod-foo/swig-foo.c
@@ -771,7 +771,7 @@ static swig_module_info *SWIG_Guile_GetM
 SWIGINTERN char *
 SWIG_Guile_scm2newstr(SCM str, size_t *len) {
 #define FUNC_NAME "SWIG_Guile_scm2newstr"
-  char *ret;
+  char *ret, *tmp;
   size_t l;
 
   SCM_ASSERT (SCM_STRINGP(str), str, 1, FUNC_NAME);
@@ -780,7 +780,9 @@ SWIG_Guile_scm2newstr(SCM str, size_t *l
   ret = (char *) SWIG_malloc( (l + 1) * sizeof(char));
   if (!ret) return NULL;
 
-  memcpy(ret, SCM_STRING_CHARS(str), l);
+  tmp = scm_to_utf8_string(str);
+  memcpy(ret, tmp, l);
+  free(tmp);
   ret[l] = '\0';
   if (len) *len = l;
   return ret;
Index: gnucash-2.4.7/src/gnome-utils/swig-gnome-utils.c
===================================================================
--- gnucash-2.4.7.orig/src/gnome-utils/swig-gnome-utils.c
+++ gnucash-2.4.7/src/gnome-utils/swig-gnome-utils.c
@@ -771,7 +771,7 @@ static swig_module_info *SWIG_Guile_GetM
 SWIGINTERN char *
 SWIG_Guile_scm2newstr(SCM str, size_t *len) {
 #define FUNC_NAME "SWIG_Guile_scm2newstr"
-  char *ret;
+  char *ret, *tmp;
   size_t l;
 
   SCM_ASSERT (SCM_STRINGP(str), str, 1, FUNC_NAME);
@@ -780,7 +780,9 @@ SWIG_Guile_scm2newstr(SCM str, size_t *l
   ret = (char *) SWIG_malloc( (l + 1) * sizeof(char));
   if (!ret) return NULL;
 
-  memcpy(ret, SCM_STRING_CHARS(str), l);
+  tmp = scm_to_utf8_string(str);
+  memcpy(ret, tmp, l);
+  free(tmp);
   ret[l] = '\0';
   if (len) *len = l;
   return ret;
Index: gnucash-2.4.7/src/gnome/swig-gnome.c
===================================================================
--- gnucash-2.4.7.orig/src/gnome/swig-gnome.c
+++ gnucash-2.4.7/src/gnome/swig-gnome.c
@@ -771,7 +771,7 @@ static swig_module_info *SWIG_Guile_GetM
 SWIGINTERN char *
 SWIG_Guile_scm2newstr(SCM str, size_t *len) {
 #define FUNC_NAME "SWIG_Guile_scm2newstr"
-  char *ret;
+  char *ret, *tmp;
   size_t l;
 
   SCM_ASSERT (SCM_STRINGP(str), str, 1, FUNC_NAME);
@@ -780,7 +780,9 @@ SWIG_Guile_scm2newstr(SCM str, size_t *l
   ret = (char *) SWIG_malloc( (l + 1) * sizeof(char));
   if (!ret) return NULL;
 
-  memcpy(ret, SCM_STRING_CHARS(str), l);
+  tmp = scm_to_utf8_string(str);
+  memcpy(ret, tmp, l);
+  free(tmp);
   ret[l] = '\0';
   if (len) *len = l;
   return ret;
Index: gnucash-2.4.7/src/html/swig-gnc-html.c
===================================================================
--- gnucash-2.4.7.orig/src/html/swig-gnc-html.c
+++ gnucash-2.4.7/src/html/swig-gnc-html.c
@@ -771,7 +771,7 @@ static swig_module_info *SWIG_Guile_GetM
 SWIGINTERN char *
 SWIG_Guile_scm2newstr(SCM str, size_t *len) {
 #define FUNC_NAME "SWIG_Guile_scm2newstr"
-  char *ret;
+  char *ret, *tmp;
   size_t l;
 
   SCM_ASSERT (SCM_STRINGP(str), str, 1, FUNC_NAME);
@@ -780,7 +780,9 @@ SWIG_Guile_scm2newstr(SCM str, size_t *l
   ret = (char *) SWIG_malloc( (l + 1) * sizeof(char));
   if (!ret) return NULL;
 
-  memcpy(ret, SCM_STRING_CHARS(str), l);
+  tmp = scm_to_utf8_string(str);
+  memcpy(ret, tmp, l);
+  free(tmp);
   ret[l] = '\0';
   if (len) *len = l;
   return ret;
Index: gnucash-2.4.7/src/report/report-gnome/swig-report-gnome.c
===================================================================
--- gnucash-2.4.7.orig/src/report/report-gnome/swig-report-gnome.c
+++ gnucash-2.4.7/src/report/report-gnome/swig-report-gnome.c
@@ -771,7 +771,7 @@ static swig_module_info *SWIG_Guile_GetM
 SWIGINTERN char *
 SWIG_Guile_scm2newstr(SCM str, size_t *len) {
 #define FUNC_NAME "SWIG_Guile_scm2newstr"
-  char *ret;
+  char *ret, *tmp;
   size_t l;
 
   SCM_ASSERT (SCM_STRINGP(str), str, 1, FUNC_NAME);
@@ -780,7 +780,9 @@ SWIG_Guile_scm2newstr(SCM str, size_t *l
   ret = (char *) SWIG_malloc( (l + 1) * sizeof(char));
   if (!ret) return NULL;
 
-  memcpy(ret, SCM_STRING_CHARS(str), l);
+  tmp = scm_to_utf8_string(str);
+  memcpy(ret, tmp, l);
+  free(tmp);
   ret[l] = '\0';
   if (len) *len = l;
   return ret;
Index: gnucash-2.4.7/src/report/report-system/swig-report-system.c
===================================================================
--- gnucash-2.4.7.orig/src/report/report-system/swig-report-system.c
+++ gnucash-2.4.7/src/report/report-system/swig-report-system.c
@@ -771,7 +771,7 @@ static swig_module_info *SWIG_Guile_GetM
 SWIGINTERN char *
 SWIG_Guile_scm2newstr(SCM str, size_t *len) {
 #define FUNC_NAME "SWIG_Guile_scm2newstr"
-  char *ret;
+  char *ret, *tmp;
   size_t l;
 
   SCM_ASSERT (SCM_STRINGP(str), str, 1, FUNC_NAME);
@@ -780,7 +780,9 @@ SWIG_Guile_scm2newstr(SCM str, size_t *l
   ret = (char *) SWIG_malloc( (l + 1) * sizeof(char));
   if (!ret) return NULL;
 
-  memcpy(ret, SCM_STRING_CHARS(str), l);
+  tmp = scm_to_utf8_string(str);
+  memcpy(ret, tmp, l);
+  free(tmp);
   ret[l] = '\0';
   if (len) *len = l;
   return ret;
Index: gnucash-2.4.7/src/swig-runtime.h
===================================================================
--- gnucash-2.4.7.orig/src/swig-runtime.h
+++ gnucash-2.4.7/src/swig-runtime.h
@@ -796,7 +796,7 @@ static swig_module_info *SWIG_Guile_GetM
 SWIGINTERN char *
 SWIG_Guile_scm2newstr(SCM str, size_t *len) {
 #define FUNC_NAME "SWIG_Guile_scm2newstr"
-  char *ret;
+  char *ret, *tmp;
   size_t l;
 
   SCM_ASSERT (SCM_STRINGP(str), str, 1, FUNC_NAME);
@@ -805,7 +805,9 @@ SWIG_Guile_scm2newstr(SCM str, size_t *l
   ret = (char *) SWIG_malloc( (l + 1) * sizeof(char));
   if (!ret) return NULL;
 
-  memcpy(ret, SCM_STRING_CHARS(str), l);
+  tmp = scm_to_utf8_string(str);
+  memcpy(ret, tmp, l);
+  free(tmp);
   ret[l] = '\0';
   if (len) *len = l;
   return ret;
