Re: Mac OS Roman import?

Поиск
Список
Период
Сортировка
От Sam Mason
Тема Re: Mac OS Roman import?
Дата
Msg-id 20091019223003.GE5407@samason.me.uk
обсуждение исходный текст
Ответ на Mac OS Roman import?  (Christophe Pettus <xof@thebuild.com>)
Список pgsql-general
On Mon, Oct 19, 2009 at 02:54:38PM -0700, Christophe Pettus wrote:
> I find myself needing to regularly import data encoded as Mac OS Roman
> (yes, it is coming from an Macintosh OS 9 system) into a UTF-8
> PostgreSQL database.

How tightly integrated into PG do you want it?  You can define custom
character conversions if you want (although I've never tried this).
Python appears to know how to convert to/from "MacRoman"[1] by default,
so pl/python should make this reasonably easy.

Otherwise, iconv is a useful tool.  The project's homepage suggests
that it knows how to do the conversions, but I can't figure out the
command line needed.

--
  Sam  http://samason.me.uk/

 [1] http://docs.python.org/library/codecs.html
 [2] http://www.gnu.org/software/libiconv/

В списке pgsql-general по дате отправления:

Предыдущее
От: Christophe Pettus
Дата:
Сообщение: Mac OS Roman import?
Следующее
От: Scott Ribe
Дата:
Сообщение: Re: Mac OS Roman import?