On Wed, 27 Mar 2002, Tatsuhiko Miyagawa wrote:

> At Wed, 27 Mar 2002 10:25:53 +0000 (GMT),
> Matt Sergeant wrote:
>
> > Ah this is much clearer now.
>
> *grin*
>
> > SQLite expects and requires utf-8 characters
> > as input (it can't cope with binary data - it is purely a text based
> > database). Sorry, but that's just the way it goes.
>
> Really? I can't see any document like that on sqlite webpage.

Sorry, should have said DBD::SQLite.

> And in fact, I've used EUC-JP as an internal encodings of data in
> SQLite without any problem (with my patch applied). It means you can
> even use japanese characters in LIKE query.
>
>   SELECT * FROM table WHERE name LIKE 'ほげ%'
>
> For your information, I compiled sqlite with the default sqlite.h,
> saying
>
>   #define SQLITE_ISO8859 1

Right, and DBD::SQLite is compiled with UTF-8 instead, because this is
Perl, and in Perl characters are unicode code points represented
internally as UTF-8.

> > The way to get this working with perl 5.6.1 while still using native
> > japanese characters is to use something like Text::Iconv to do the
> > conversion:
>
> We can use famous Jcode module for the conversion, but it'd be very
> tiresome and thus will reduce this fantasitic sql engine's handiness
> and portablity. I son't want to see that.

OK, then I suggest that we use a database parameter to turn off SvUTF8on
calls. Which I believe is what's breaking this.

-- 
<!-- Matt -->
<:->Get a smart net</:->


Reply via email to