On Thu, Mar 16, 2006 at 03:11:27AM -0800, CSN wrote: > I tried changing my database to UTF8 and then > importing the dump (even tried iconv). It choked (on > an accented e). Then somehow the database got created > as LATIN9, and I was able to import successfully. I > guess if it works, I'll be leaving it alone for the > time being. Note, when you create a dump, pg_dump adds a "set client_encoding" at the top of the dump. If you change the encoding using iconv without changing that line, you'll get problems in the import. In theory dumping from a latin9 database into a utf8 one should Just Work(tm) because PostgreSQL will convert the data while loading. > I still have problems when emdashes are stored in the > database as HTML entities, but they're displayed as > emdashes in a web form, but then get stored back in > the database wrong when edited (an accented A IIRC). I > dunno - maybe it's a browser or Rails thing. I think the stuff submitted by the browser has a given encoding and won't be encoded with HTML entities. Converting unicode to HTML entities has to be done somewhere there... Hope this helps, -- Martijn van Oosterhout <kleptog@xxxxxxxxx> http://svana.org/kleptog/ > Patent. n. Genius is 5% inspiration and 95% perspiration. A patent is a > tool for doing 5% of the work and then sitting around waiting for someone > else to do the other 95% so you can sue them.
Attachment:
signature.asc
Description: Digital signature