tags 322552 + confirmed
tags 322552 + patch 
forwarded 322552 [EMAIL PROTECTED]
thanks

hi Marius,

On Thu, Aug 11, 2005 at 01:57:34PM +0200, Marius Mikucionis wrote:
> I love the idea of putting comments into image files, 
> however I'd like to comment on picture in my mother-tongue 
> and imageindex assumes this:
> <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=ISO-8859-1">
> 
> In order to display my comments correctly I need to customize the pages to:
> <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=UTF-8">

attached, two small patches which make this possible. Im forwarding this
bugreport to upstream. Thanks for your report. 

Edwin: see http://bugs.debian.org/322552 for the full feature request. I
dont know if this is a solution you like, if so, would be nice to have
it in the next imageindex version. 

bye,
    - michael
--- imageindex-1.0.8/imageindex 2005-05-18 01:03:19.000000000 +0200
+++ imageindex  2005-08-11 14:40:45.000000000 +0200
@@ -263,6 +263,9 @@
 $thumbxmetatag    = 'ThumbnailX';
 $thumbymetatag    = 'ThumbnailY';
 
+# which charset to use
+$file_charset     = 'ISO-8859-1';
+
 # Any of the above can be overridden in an rc file in the user's home dir
 $rcfile = "$ENV{'HOME'}/.imageindexrc";
 
@@ -1068,7 +1071,7 @@
     print "<HEAD>\n";
     $verstring = &versionstring();
     printf ("<META NAME=\"GENERATOR\" CONTENT=\"imageindex %s\">\n", 
$verstring);
-    printf ("<META HTTP-EQUIV=\"Content-Type\" CONTENT=\"text/html; 
charset=ISO-8859-1\">\n");
+    printf ("<META HTTP-EQUIV=\"Content-Type\" CONTENT=\"text/html; 
charset=${file_charset}\">\n");
     print "<TITLE>$current_titletext - $filename</TITLE>\n";
     print "<LINK TYPE=\"text/css\" REL=\"stylesheet\" 
HREF=\"../$stylefile\">\n";
     print "</HEAD>\n<BODY>\n";
@@ -1634,7 +1637,7 @@
     print "<HEAD>\n";
     $verstring = &versionstring();
     printf ("<META NAME=\"GENERATOR\" CONTENT=\"imageindex %s\">\n", 
$verstring);
-    printf ("<META HTTP-EQUIV=\"Content-Type\" CONTENT=\"text/html; 
charset=ISO-8859-1\">\n");
+    printf ("<META HTTP-EQUIV=\"Content-Type\" CONTENT=\"text/html; 
charset=${file_charset}\">\n");
     if (defined ($write_meta_tag{$titlemetatag})) {
        print "<META NAME=\"$titlemetatag\" CONTENT=\"$current_titletext\">\n";
     }
@@ -1978,7 +1981,7 @@
     print "<HEAD>\n";
     $verstring = &versionstring();
     printf ("<META NAME=\"GENERATOR\" CONTENT=\"imageindex %s\">\n", 
$verstring);
-    printf ("<META HTTP-EQUIV=\"Content-Type\" CONTENT=\"text/html; 
charset=ISO-8859-1\">\n");
+    printf ("<META HTTP-EQUIV=\"Content-Type\" CONTENT=\"text/html; 
charset=${file_charset}\">\n");
     print "<LINK TYPE=\"text/css\" REL=\"stylesheet\" HREF=\"../$stylefile\">";
     print "<TITLE>$current_titletext</TITLE>\n";
     print "<LINK TYPE=\"text/css\" REL=\"stylesheet\" 
HREF=\"../$stylefile\">\n";
@@ -2008,7 +2011,7 @@
     print "<HEAD>\n";
     $verstring = &versionstring();
     printf ("<META NAME=\"GENERATOR\" CONTENT=\"imageindex %s\">\n", 
$verstring);
-    printf ("<META HTTP-EQUIV=\"Content-Type\" CONTENT=\"text/html; 
charset=ISO-8859-1\">\n");
+    printf ("<META HTTP-EQUIV=\"Content-Type\" CONTENT=\"text/html; 
charset=${file_charset}\">\n");
     print "<LINK TYPE=\"text/css\" REL=\"stylesheet\" 
HREF=\"../$stylefile\">\n";
     print "<TITLE>$current_titletext</TITLE>\n";
     print "</HEAD>\n<BODY>\n";
--- imageindex-1.0.8/imageindex.pod     2004-09-07 06:11:09.000000000 +0200
+++ imageindex.pod      2005-08-11 14:42:23.000000000 +0200
@@ -409,6 +409,11 @@
 
     $montagetitle = "%n images %b through %e";
 
+Control which charset the generated html pages should have. This defaults
+to ISO-8859-1, but can either be UTF8 or any other encoding:
+
+    $file_charset = "ISO-8859-1";
+
 The following eight variables control how dates and times are formatted when
 written into the HTML. Again we're using printf(1)-like variables where codes
 are interpolated according to a user's taste.

Reply via email to