Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
bugzilla
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
etersoft
bugzilla
Commits
7c3069b2
Commit
7c3069b2
authored
Sep 24, 2007
by
mkanat%bugzilla.org
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Bug 369835: email_in.pl should convert character encoding to utf8
Patch By Fedor Ezeev <fe@alterplast.ru> r=mkanat, a=mkanat
parent
b563c511
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
0 deletions
+9
-0
email_in.pl
email_in.pl
+9
-0
No files found.
email_in.pl
View file @
7c3069b2
...
...
@@ -36,6 +36,7 @@ use Email::MIME;
use
Email::MIME::Attachment::
Stripper
;
use
Getopt::
Long
qw(:config bundling)
;
use
Pod::
Usage
;
use
Encode
qw(encode decode)
;
use
Bugzilla
;
use
Bugzilla::
Bug
qw(ValidateBugID)
;
...
...
@@ -295,9 +296,17 @@ sub get_text_alternative {
my
$body
;
foreach
my
$part
(
@parts
)
{
my
$ct
=
$part
->
content_type
||
'text/plain'
;
my
$charset
=
'iso-8859-1'
;
if
(
$ct
=~
/charset=([^;]+)/
)
{
$charset
=
$1
;
}
debug_print
(
"Part Content-Type: $ct"
,
2
);
debug_print
(
"Part Character Encoding: $charset"
,
2
);
if
(
!
$ct
||
$ct
=~
/^text\/plain/i
)
{
$body
=
$part
->
body
;
if
(
Bugzilla
->
params
->
{
'utf8'
})
{
$body
=
encode
(
'UTF-8'
,
decode
(
$charset
,
$body
));
}
last
;
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment