lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]



On Tue, May 6, 2008 at 5:13 AM, Peter Jacobi <pjacobi.de@googlemail.com> wrote:
> I don't know if it is the driver's responsibility to do
> character mapping,

If your Firebird connection character set (encoding) differs from
the system character set (encoding), sure there are conversions
to do in the driver.
Precisely. Just setup your db connection to use the same charset your system is using, and the fbclient/fbserver will do the mapping.
 
> Honestly, I just use iso-8859-1 and am happy with it.

If every character set matches in your system setup
(charset of the database table, connection charset,
system charset, and the charset the user expects),
no problems will occur.

This is the (legitimate) reason why charset issues
are usually postponed until someone has the
requirements to handle different charsets.

Sure. But those requirements will be present in any part of the system. If your software needs to handle multi languages, locales etc, then chances are you will already have a normalization for user input (say, iso-8859-1 to utf-8). If your application only uses utf-8 internally, then why does the database driver needs to do any mapping on it? Just configure the db connection to utf-8 and that's it - Firebird handles the rest (I *hope* :).

If the question was if my driver is able to set the charset option on the connection, then the answer is yes. It is quite easy, actually.

--rb