Skip to content

Instantly share code, notes, and snippets.

@miyagawa
Created April 6, 2009 01:01
Show Gist options
  • Save miyagawa/90590 to your computer and use it in GitHub Desktop.
Save miyagawa/90590 to your computer and use it in GitHub Desktop.
Index: dbdimp.c
===================================================================
--- dbdimp.c (revision 6024)
+++ dbdimp.c (working copy)
@@ -405,7 +405,11 @@
}
else {
STRLEN len;
- char * data = SvPV(value, len);
+ char *data;
+ if (imp_dbh->unicode) {
+ sv_utf8_upgrade(value);
+ }
+ data = SvPV(value, len);
retval = sqlite3_bind_text(imp_sth->stmt, i+1, data, len, SQLITE_TRANSIENT);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment