Yenya's World

Wed, 31 Aug 2005

DBI::Shell in UTF-8

So, it seems that I can now work with our Oracle database entirely in UTF-8. The last problem remained in dbish, where it was not possible to input non-ASCII characters with UTF-8 locale. It turned out that the fix is quite straightforward: use Term::ReadLine::Gnu instead of plain Term::ReadLine.

dbish> select * from b_kas_pokus/
"z dbh->do: Maličký ježeček"
"z dbh->execute: Maličký ježeček"
"Ayanami Rei in Kanji: 綾波 レイ"
"Ayanami Rei in Hiragana: あやなみ れい"
[4 rows of 1 fields returned]

Pretty cool, ins't it? Now I can insert even Ayanami Rei's name in Kanji or Hiragana to the database :-).

Note: You may not see the Kanji or Hiragana in the above text correctly. It is because our HTTP server has a super-intelligent module, which tries to recode the WWW pages according to your browser's preferences. So if your browser says that it prefers US-ASCII or ISO-8859-n, you will not be able to see the characters which cannot be represented in the requested encoding. Set your browser to request UTF-8 by default (in Galeon, this can be done in Edit -> Preferences -> Language -> Encodings -> Default, and set UTF-8 to be the default).

Section: /computers (RSS feed) | Permanent link | 0 writebacks


Yenya's World: Linux and beyond - Yenya's blog.


RSS feed

Jan "Yenya" Kasprzak

The main page of this blog



Blog roll:

alphabetically :-)