mirror of
https://github.com/DBD-SQLite/DBD-SQLite
synced 2025-06-07 22:28:47 -04:00
No need to check unicode twice
This commit is contained in:
parent
6bac0136b3
commit
43225fd7eb
1 changed files with 13 additions and 5 deletions
14
dbdimp.c
14
dbdimp.c
|
@ -856,11 +856,19 @@ sqlite_db_STORE_attrib(SV *dbh, imp_dbh_t *imp_dbh, SV *keysv, SV *valuesv)
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (strEQ(key, "sqlite_unicode") || strEQ(key, "unicode")) {
|
if (strEQ(key, "sqlite_unicode")) {
|
||||||
if (strEQ(key, "unicode")) {
|
|
||||||
/* it's too early to warn the deprecation of sqlite_unicode as it's widely used */
|
/* it's too early to warn the deprecation of sqlite_unicode as it's widely used */
|
||||||
_warn_deprecated_if_possible(key, "sqlite_string_mode");
|
#if PERL_UNICODE_DOES_NOT_WORK_WELL
|
||||||
|
sqlite_trace(dbh, imp_dbh, 3, form("Unicode support is disabled for this version of perl."));
|
||||||
|
imp_dbh->string_mode = DBD_SQLITE_STRING_MODE_PV;
|
||||||
|
#else
|
||||||
|
imp_dbh->string_mode = SvTRUE(valuesv) ? DBD_SQLITE_STRING_MODE_UNICODE_NAIVE : DBD_SQLITE_STRING_MODE_PV;
|
||||||
|
#endif
|
||||||
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (strEQ(key, "unicode")) {
|
||||||
|
_warn_deprecated_if_possible(key, "sqlite_string_mode");
|
||||||
#if PERL_UNICODE_DOES_NOT_WORK_WELL
|
#if PERL_UNICODE_DOES_NOT_WORK_WELL
|
||||||
sqlite_trace(dbh, imp_dbh, 3, form("Unicode support is disabled for this version of perl."));
|
sqlite_trace(dbh, imp_dbh, 3, form("Unicode support is disabled for this version of perl."));
|
||||||
imp_dbh->string_mode = DBD_SQLITE_STRING_MODE_PV;
|
imp_dbh->string_mode = DBD_SQLITE_STRING_MODE_PV;
|
||||||
|
|
Loading…
Add table
Reference in a new issue