![]() I have some serious reading to catch up on now. ![]() ![]() Next I ran my update_feeds.py script and my aggregator aggregated, which was really awesome to see. The website looked just like it did before. Then I created the shiny new utf-8 database, using the command from the pg_dumpall output, with a slight change: psql -U bryan bryan < 8Īfter starting up apache2 again: sudo /etc/init.d/apache2 start Then I dropped the lame old latin1 database, after shutting down apache2: sudo /etc/init.d/apache2 stop Then I converted it to utf-8 with iconv: iconv -from-code latin1 -to-code utf-8 > 8 So, I dumped just that database: pg_dump -U bryan > Sure enough, my database was created like so: CREATE DATABASE bryan WITH TEMPLATE = template0 OWNER = bryan ENCODING = 'LATIN1' To change encoding and collation of template1 you have to first delete. I decided it was time to learn how to convert it to utf-8.įirst, I did a pg_dumpall in order to get a look at things (this happens automatically every night, actually): /usr/bin/pg_dumpall -U > /home/bryan/backups/ CREATE DATABASE newdb WITH OWNER postgres ENCODING 'UTF8' TABLESPACE pgdefault LCCOLLATE 'zhCN.UTF-8' CONNECTION LIMIT -1 TEMPLATE template0 This will work, however it means that any changes you made to template1 won't be applied to newly created database. I hadn’t paid any attention to this, but apparently my blog database was using latin1. ![]() After some serious investigation, I found that psycopg was barfing error messages because the feeds that were being stuffed into my postgresql database contained utf-8 characters that it couldn’t figure out how to convert into latin1 characters. I have an aggregator for all our friends blogs, very similar to the Django aggregator, except that mine hasn’t been aggregating. I had a problem with my family django-powered website. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |