[prev] [thread] [next] [lurker] [Date index for 2005/02/08]
Author: simon
Date: 2005-02-08 15:21:34 +0000 (Tue, 08 Feb 2005)
New Revision: 1851
Modified:
trunk/buscador/
trunk/buscador/TODO
trunk/buscador/lib/Buscador/UTF8.pm
Log:
some UTF8 changes
Property changes on: trunk/buscador
___________________________________________________________________
Name: svn:ignore
+ *.yml
*.mails
Modified: trunk/buscador/TODO
===================================================================
--- trunk/buscador/TODO 2005-02-08 13:00:45 UTC (rev 1850)
+++ trunk/buscador/TODO 2005-02-08 15:21:34 UTC (rev 1851)
@@ -9,18 +9,17 @@
* Atom feed for threads - DONE
* Split into plugins with munging of parse_path - M:P:O - DONE
* Plugins should be able to affect setup of Email::Store::* - X
-* Central install and config file - X
+* Central install and config file - DONE
* Docs - half
* Tests - X
- make sure that all attchments are clickable - DONE
-- make foreign chars work - DONE
-- show scrubbed html where appropriate - scrub
-- fix troublesome.mail
-- make a good test suite of mails
-- make text/plain default body if no other available
+- show scrubbed html where appropriate - DONE
+- fix troublesome.mail - DONE
+- make a good test suite of mails - half
+- make text/plain default body if no other available - DONE
Modified: trunk/buscador/lib/Buscador/UTF8.pm
===================================================================
--- trunk/buscador/lib/Buscador/UTF8.pm 2005-02-08 13:00:45 UTC (rev 1850)
+++ trunk/buscador/lib/Buscador/UTF8.pm 2005-02-08 15:21:34 UTC (rev 1851)
@@ -1,5 +1,4 @@
package Buscador::UTF8;
-use utf8;
=head1 NAME
@@ -27,6 +26,8 @@
package Email::Store::Mail;
use strict;
+use utf8;
+use Text::Unidecode;
sub subject {
my $mail = shift;
@@ -41,17 +42,19 @@
my $mail = shift;
my $mime = Email::MIME->new($mail->message);
- my $body = $mail->simple->body;
+ my $body = $mime->body;
+
my $charset = $mime->{ct}->{attributes}{charset};
- if ($charset and $charset !~ /utf-?8/i) {
+ if ($charset and $charset !~ /utf-?8/) {
eval {
require Encode;
$body = Encode::decode($charset, $body);
- #Encode::_utf8_off($body);
+ Encode::_utf8_off($body);
};
}
- $body;
+ unidecode($body);
+ #$body;
}
1;
Generated at 16:00 on 08 Feb 2005 by mariachi 0.52