view · edit · sidebar · attach · print · history

Encoding with Ruby 1.9.3 and Posgresql

Say you have a database with strings that have the following encodings in it:

encoding type ASCII-8BIT UTF-8
encoding type ASCII-8BIT US-ASCII
encoding type UTF-8 US-ASCII
encoding type ASCII-8BIT US-ASCII
encoding type UTF-8 UTF-8
encoding type UTF-8 ASCII-8BIT

Now you want to convert this all to UTF-8 - how do you do it?

  • Postgres: For 7.2, --enable-unicode-conversion is not necessary. The Unicode conversion functionality is automatically enabled if --enable-multibyte is specified.
  • Michael Granger: pg gem author
view · edit · sidebar · attach · print · history
Page last modified on October 15, 2011, at 06:23 PM