develooper Front page | perl.perl5.porters | Postings from August 2021

Re: DBD::SQLite WAS Re: "use v5.36.0" should imply UTF-8 encodedsource

Thread Previous | Thread Next
From:
haj
Date:
August 3, 2021 10:43
Subject:
Re: DBD::SQLite WAS Re: "use v5.36.0" should imply UTF-8 encodedsource
Message ID:
87bl6e3j2z.fsf@hajtower
Felipe Gasper <felipe@felipegasper.com> writes:

>> [...] 
>> You see the downside of this when you have a non-ASCII literal in a
>> iso-latin-1 encoded Perl source (e.g. "รค" or "\x{e4}").  For Perl, it is
>> the same character as "\N{LATIN SMALL LETTER A WITH DIAERESIS}", but if
>> you feed both to the database you get different results.
>
> This should no longer be the case if you avoid DBD_SQLITE_STRING_MODE_PV.
>
>> It seems that the driver still inspects the infamous UTF-8-flag to
>> decide whether a literal is encoded or not.
>
> This is not the case, except with DBD_SQLITE_STRING_MODE_PV, which for
> backward compatibility reasons remains the default.

You are right, in both cases.

I tripped over a glitch in the documentation of DBD::SQLite 1.67_07
(https://github.com/DBD-SQLite/DBD-SQLite/issues/86) and failed to
re-check when 1.70 was released.
-- 
Sorry for the noise,
haj

Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About