[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: [CVS update] l10n-russian



On Tuesday 13 January 2004 19:10, Alexandra N. Kossovsky wrote:
> On Tue, Jan 13, 2004 at 02:53:57PM +0300, Vasiliy 'Druid' Misharev wrote:
>
> > On Tue, Jan 13, 2004 at 02:47:31PM +0300, Alexandra N. Kossovsky wrote:
> > 
> >
> > > А если связаться с админами alioth? Пусть всегда прописывают utf-8.
> > > Американцы с западноевропейцами от этого не пострадают, а всем
> > > остальным
 станет лучше...
> >
> > 
> > а если там японцы какие живут?
>
> 
> Ну меня на месте японцев одинаково не устраивали бы что непрописанная
> кодировка (т.е. неявно прописанная us-ascii), что utf-8. Поэтому японцам
> должно быть одинаково плохо. А заботиться о том, чтобы японцам стало не
> только не хуже, но и лучше -- уже не наша задача.
> 
> Безусловно, лучше, чтобы кодировку можно было прописывать явно. Но то,
> что лучше -- не всегда возможно.

Если я правильно понял питона, то исправить все это можно следующим патчем 
(супротив cvs-syncmail 1.0, лежит на sf.net/projects/cvs-syncmail)
--- syncmail.orig	2004-01-13 19:03:37.000000000 +0700
+++ syncmail	2004-01-13 19:08:58.000000000 +0700
@@ -56,6 +56,9 @@
         header will of the outgoing message will look like user@hostname.  By
         default, hostname is the machine's fully qualified domain name.
 
+    --charset=charset
+        The encoding of the message.
+
     --help / -h
         Print this text.
 
@@ -209,7 +212,7 @@
 
 
 
-def blast_mail(subject, people, filestodiff, contextlines, fromhost):
+def blast_mail(subject, people, filestodiff, contextlines, fromhost, charset):
     # cannot wait for child process or that will cause parent to retain cvs
     # lock for too long.  Urg!
     if not os.fork():
@@ -229,9 +232,11 @@
 From: %(author)s
 To: %(people)s
 Subject: %(subject)s
+Content-Type: text/plain; charset=%(charset)s
 ''' % {'author' : author,
        'people' : string.join(people, COMMASPACE),
        'subject': subject,
+       'charset': charset,
        }
             s.write(sys.stdin.read())
             # append the diffs if available
@@ -275,6 +280,8 @@
             verbose = 0
         elif opt in ('-f', '--fromhost'):
             fromhost = arg
+        elif opt == '--charset':
+            charset = arg
 
     # What follows is the specification containing the files that were
     # modified.  The argument actually must be split, with the first component
@@ -312,7 +319,7 @@
 
     if verbose:
         print 'Generating notification message...'
-    blast_mail(subject, people, specs[1:], contextlines, fromhost)
+    blast_mail(subject, people, specs[1:], contextlines, fromhost, charset)
     if verbose:
         print 'Generating notification message... done.'
 

Attachment: pgpzs3EdYRfBT.pgp
Description: signature


Reply to: