From: "Konstantin A. Lepikhov" <lakostis@anti-leasure.ru>
To: ALT Linux Sisyphus discussion list <sisyphus@altlinux.ru>
Subject: [sisyphus] Re: Белку на мыло!
Date: Mon, 15 Nov 2004 01:47:20 +0300
Message-ID: <20041114224720.GA10497@lks.home> (raw)
In-Reply-To: <20041114202123.GA7907@lks.home>
[-- Attachment #1: Type: text/plain, Size: 942 bytes --]
Hi Konstantin!
Sunday 14, at 11:21:24 PM you wrote:
> Hi!
>
> Так и не заработала в Сизифе белка в utf-8 и с поддержкой 8-bit.
> Предыдущие советы насчет mbstring не помогли - все также упорно пытаемся
> изобразить фрейм в родной 8-bit кодировке при ответе (видимо, эта часть
> вообще _никак_ не перекодируется) посреди utf-8 страницы. Пионерский задор
> авторов sq просто удивляет :-]
Сам же себе и помогаю :) Итак, несколько патчей для облегчения страданий:
1) маленький фикс для quoting'а (есть такая бага в 1.4.3a).
2) грязный хак для правильного перекодирования 8-битного тела письма при ответе
в utf-8. Поскольку у меня cyrus, то проблемы перекодирования subj
и остального не так значительны ;)
--
WBR, Konstantin chat with ==>ICQ: 109916175
Lepikhov, speak to ==>JID: lakostis@jabber.org
aka L.A. Kostis write to ==>mailto:lakostis@pisem.net.nospam
...The information is like the bank... (c) EC8OR
[-- Attachment #2: sq-1.4.3a-quoting_fix.diff --]
[-- Type: text/plain, Size: 693 bytes --]
--- a/src/compose.php.orig 2004-05-31 21:32:34.000000000 +0400
+++ a/src/compose.php 2004-11-15 01:21:27.000000000 +0300
@@ -757,7 +760,7 @@ function newMail ($mailbox='', $passed_i
sqWordWrap($rewrap_body[$i], ($editor_size));
if (preg_match("/^(>+)/", $rewrap_body[$i], $matches)) {
$gt = $matches[1];
- $body .= '>' . str_replace("\n", "\n>$gt ", rtrim($rewrap_body[$i])) ."\n";
+ $body .= '>' . str_replace("\n", "\n>> ", rtrim($rewrap_body[$i])) ."\n";
} else {
$body .= '> ' . str_replace("\n", "\n> ", rtrim($rewrap_body[$i])) . "\n";
}
[-- Attachment #3: sq-1.4.3a-utf8_reply_hack.diff --]
[-- Type: text/plain, Size: 1150 bytes --]
--- a/src/compose.php.orig 2004-05-31 21:32:34.000000000 +0400
+++ a/src/compose.php 2004-11-15 01:21:27.000000000 +0300
@@ -609,6 +609,7 @@ function newMail ($mailbox='', $passed_i
}
$encoding = $message->header->encoding;
+ $charset = $message->header->getParameter('charset');
$type0 = $message->type0;
$type1 = $message->type1;
foreach ($entities as $ent) {
@@ -629,7 +630,9 @@ function newMail ($mailbox='', $passed_i
$bodypart = $languages[$squirrelmail_language]['XTRA_CODE']('decode', $bodypart);
}
}
+ $bodypart = charset_decode($charset, $bodypart);
$body .= $bodypart;
+
}
if ($default_use_priority) {
$mailprio = substr($orig_header->priority,0,1);
@@ -1067,7 +1070,8 @@ function showInputForm ($session, $value
}
}
else {
- echo htmlspecialchars(decodeHeader($body,false,false));
+// echo htmlspecialchars(decodeHeader($body,false,false));
+ echo decodeHeader($body,true,false);
}
echo '</textarea><br />' . "\n" .
' </td>' . "\n" .
next prev parent reply other threads:[~2004-11-14 22:47 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-11-14 20:21 [sisyphus] " Konstantin A. Lepikhov
2004-11-14 22:47 ` Konstantin A. Lepikhov [this message]
2004-11-16 5:36 ` [sisyphus] " Konstantin A. Lepikhov
2004-11-18 14:13 ` Andy Gorev
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20041114224720.GA10497@lks.home \
--to=lakostis@anti-leasure.ru \
--cc=sisyphus@altlinux.ru \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
ALT Linux Sisyphus discussions
This inbox may be cloned and mirrored by anyone:
git clone --mirror http://lore.altlinux.org/sisyphus/0 sisyphus/git/0.git
# If you have public-inbox 1.1+ installed, you may
# initialize and index your mirror using the following commands:
public-inbox-init -V2 sisyphus sisyphus/ http://lore.altlinux.org/sisyphus \
sisyphus@altlinux.ru sisyphus@altlinux.org sisyphus@lists.altlinux.org sisyphus@lists.altlinux.ru sisyphus@lists.altlinux.com sisyphus@linuxteam.iplabs.ru sisyphus@list.linux-os.ru
public-inbox-index sisyphus
Example config snippet for mirrors.
Newsgroup available over NNTP:
nntp://lore.altlinux.org/org.altlinux.lists.sisyphus
AGPL code for this site: git clone https://public-inbox.org/public-inbox.git