diff options
author | Arne Georg Gleditsch <argggh@taniquetil.(none)> | 2009-03-06 21:13:18 +0100 |
---|---|---|
committer | Arne Georg Gleditsch <argggh@taniquetil.(none)> | 2009-03-06 21:13:18 +0100 |
commit | 8d7d1d2595c2c3475ec27d07d8544e345dab5851 (patch) | |
tree | 6337fd7aa489a73c44abb742b2bac22741b00779 /lib/LXRng/Index | |
parent | a25f8442450d7e9fb188a979ab0897cb86e9d84f (diff) |
Added more language modules, threw things about a bit.
Diffstat (limited to 'lib/LXRng/Index')
-rw-r--r-- | lib/LXRng/Index/DBI.pm | 16 | ||||
-rw-r--r-- | lib/LXRng/Index/Pg.pm | 2 |
2 files changed, 17 insertions, 1 deletions
diff --git a/lib/LXRng/Index/DBI.pm b/lib/LXRng/Index/DBI.pm index 763f534..55e215d 100644 --- a/lib/LXRng/Index/DBI.pm +++ b/lib/LXRng/Index/DBI.pm @@ -520,6 +520,22 @@ sub get_identifier_info { \%reflines); } +sub set_rfile_charset { + my ($self, $rfile_id, $charset) = @_; + + my $dbh = $self->dbh; + my $pre = $self->prefix; + my $sth = $$self{'sth'}{'set_rfile_charset'} ||= + $dbh->prepare(qq{ + update ${pre}revisions + set body_charset = (select id from ${pre}charsets + where name = ?) + where id = ?}); + + return $sth->execute($charset, $rfile_id); +} + + sub get_rfile_timestamp { my ($self, $rfile_id) = @_; diff --git a/lib/LXRng/Index/Pg.pm b/lib/LXRng/Index/Pg.pm index 3654a72..7387abc 100644 --- a/lib/LXRng/Index/Pg.pm +++ b/lib/LXRng/Index/Pg.pm @@ -67,7 +67,7 @@ sub init_db { or die($dbh->errstr); $dbh->do(qq{insert into ${pre}charsets(name) values ('utf-8')}) or die($dbh->errstr); - $dbh->do(qq{insert into ${pre}charsets(name) values ('iso8859-1')}) + $dbh->do(qq{insert into ${pre}charsets(name) values ('iso-8859-1')}) or die($dbh->errstr); $dbh->do(qq{ |