mirror of
https://github.com/DBD-SQLite/DBD-SQLite
synced 2025-06-07 22:28:47 -04:00
DBD-SQLite: actually disabled unicode support for perl < 5.8.5
This commit is contained in:
parent
213155f32e
commit
903bb83c7b
1 changed files with 10 additions and 0 deletions
10
dbdimp.c
10
dbdimp.c
|
@ -720,7 +720,12 @@ sqlite_db_STORE_attrib (SV *dbh, imp_dbh_t *imp_dbh, SV *keysv, SV *valuesv)
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
if (strEQ(key, "unicode")) {
|
if (strEQ(key, "unicode")) {
|
||||||
|
#if (PERL_REVISION <= 5) && ((PERL_VERSION < 8) || (PERL_VERSION == 8 && PERL_SUBVERSION < 5))
|
||||||
|
sqlite_trace(dbh, (imp_xxh_t*)imp_dbh, 2, "Unicode support is disabled for this version of perl.");
|
||||||
|
imp_dbh->unicode = 0;
|
||||||
|
#else
|
||||||
imp_dbh->unicode = !(! SvTRUE(valuesv));
|
imp_dbh->unicode = !(! SvTRUE(valuesv));
|
||||||
|
#endif
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
@ -736,7 +741,12 @@ sqlite_db_FETCH_attrib (SV *dbh, imp_dbh_t *imp_dbh, SV *keysv)
|
||||||
return newSVpv(sqlite3_version,0);
|
return newSVpv(sqlite3_version,0);
|
||||||
}
|
}
|
||||||
if (strEQ(key, "unicode")) {
|
if (strEQ(key, "unicode")) {
|
||||||
|
#if (PERL_REVISION <= 5) && ((PERL_VERSION < 8) || (PERL_VERSION == 8 && PERL_SUBVERSION < 5))
|
||||||
|
sqlite_trace(dbh, (imp_xxh_t*)imp_dbh, 2, "Unicode support is disabled for this version of perl.");
|
||||||
|
return newSViv(0);
|
||||||
|
#else
|
||||||
return newSViv(imp_dbh->unicode ? 1 : 0);
|
return newSViv(imp_dbh->unicode ? 1 : 0);
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
Loading…
Add table
Reference in a new issue