> Message-ID: <[EMAIL PROTECTED]>
> Date: Sat, 27 Apr 2002 18:28:57 +0900
> From: Andy Clark <[EMAIL PROTECTED]>
> MIME-Version: 1.0
> To: MySQL <[EMAIL PROTECTED]>
> Subject: MySQL, mm.MySQL, and SQL Problems
> Content-Type: text/plain; charset=us-ascii
> Content-Transfer-Encoding: 7bit

> So I'm jumping back into database stuff after a long absence.
> (I guess you could say that I was never really *in* databases
> to begin with. Anyway...) I'm working with various databases
> and have settled on MySQL but am encountering a variety of
> problems that I hope the MySQL community can help me solve.

First off, let me say "Thanks" for the work you've done with the XML Parser.
I used it heavily on a project last year and it performed admirably.

> First, a comment. In dealing with a variety of databases, I
> was surprised to find the apparent lack of direct support for
> international characters. So I've basically resolved to insert
> all of my international text as UTF-8 encoded BLOBs. Is this
> the general approach people use for this problem?

Hmm. MM.MySQL will do this for you. Seeing your next comment leads me to
believe that you've found yourself a very old version of MM.MySQL that
doesn't do this or PreparedStatements. Both character set translation and
PreparedStatements have been features of MM.MySQL for more than a couple of
years now :)

> Second, I'm programming in Java and want to use JDBC. So I
> downloaded mm.MySQL but was dismayed to find that it doesn't
> support prepared statements. Is there any particular reason
> why?

See my above comment. PreparedStatement support has been available for quite
some time in MM.MySQL.

> I wanted to modify the source for mm.MySQL to convert to and
> from UTF-8 streams when calling PreparedStatement#setString
> and ResultSet#getString so that I can write my program as if
> the underlying database *did* support international chars.
> But without support for prepared statements, I don't know if
> I want to go through the trouble.

Don't go through the trouble :) Download version 2.0.13 from
http://mmmysql.sourceforge.net/

Un-jar it. Look at the README, especially the part about the URL paremeters
"useUnicode" and "characterEncoding". By setting these in your JDBC URL, the
driver will automagically do the right thing.

    -Mark (The "MM" behind MM.MySQL)



---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to