Menu

#44 DBD::SQLite attribute sqlite_unicode is depracated since 1.68

Current
open
nobody
None
5
2021-08-03
2021-08-03
No

DBD-SQLite-1.68 deprecated sqlite_unicode attribute and t/91_ivp_sqlite.t test fails like this:

t/81_db_sqlite.t ...... ok
EekBoek 2.04 -- Copyright 2005-2021 Squirrel Consultancy
"sqlite_unicode" attribute will be deprecated. Use "sqlite_string_mode" instead. at /builddir/build/BUILD/EekBoek-2.04/blib/lib/EB/DB/Sqlite.pm line 105.
=== IVP afgebroken ===
Compilation failed in require at t/91_ivp_sqlite.t line 16.
# Looks like your test exited with 255 just after 11.
t/91_ivp_sqlite.t ..... 
Dubious, test returned 255 (wstat 65280, 0xff00)
Failed 118/129 subtests

DBD-SQLite-1.70 removed the deprecation warning because it broken many code. But still the attribute is deprecated in favour of a new sqlite_string_mode:

    "sqlite_unicode" or "unicode" (deprecated)
        If truthy, equivalent to setting "sqlite_string_mode" to
        DBD_SQLITE_STRING_MODE_UNICODE_NAIVE; if falsy, equivalent to
        DBD_SQLITE_STRING_MODE_PV.

        Prefer "sqlite_string_mode" in all new code.

I recommend you adapting EekBoek appropriately. Currently there is this code:

    # Our database is UTF8, so deal with it properly.
    if ( $DBD::SQLite::VERSION ge "1.26_06" ) {
        $dbh->{sqlite_unicode} = 1;
    }
    else {
        $dbh->{unicode} = 1;
    }

Adding a new branch shouldn't be a problem.

Discussion

  • Johan Vromans

    Johan Vromans - 2021-08-03

    This was fixed some time ago in EekBoek 2.05.

    Please note that issues and releases are now on GitHub, http://github.com/eekboek/eekboek

     
    • Petr Písař

      Petr Písař - 2021-08-03

      Great. In that case it would be great to update https://www.eekboek.nl/ web.

       
      • Johan Vromans

        Johan Vromans - 2021-08-03

        Done. Thanks for pointing out.

         

Log in to post a comment.

MongoDB Logo MongoDB