Skip to content
Toggle navigation
Toggle navigation
This project
Loading...
Sign in
John McEleney
/
mailutils
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Issue Boards
Files
Commits
Network
Compare
Branches
Tags
Commit
81b946f5
...
81b946f50fa7b85436ed9ba6fd81ec7d432eebc5
authored
2004-12-28 19:16:04 +0000
by
Wojciech Polak
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
Fixed
1 parent
997808e9
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
1 deletions
mail/util.c
mail/util.c
View file @
81b946f
...
...
@@ -1342,14 +1342,18 @@ util_run_cached_commands (list_t *list)
void
util_rfc2047_decode
(
char
**
value
)
{
char
locale
[
32
];
char
*
charset
=
NULL
;
char
*
tmp
;
int
rc
;
if
(
!*
value
||
util_getenv
(
&
charset
,
"charset"
,
Mail_env_string
,
0
))
return
;
if
(
strcasecmp
(
charset
,
"auto"
)
==
0
)
{
memset
(
locale
,
0
,
sizeof
(
locale
));
/* Try to deduce the charset from LC_ALL or LANG variables */
tmp
=
getenv
(
"LC_ALL"
);
...
...
@@ -1362,7 +1366,9 @@ util_rfc2047_decode (char **value)
char
*
lang
;
char
*
terr
;
lang
=
strtok_r
(
tmp
,
"_"
,
&
sp
);
strncpy
(
locale
,
tmp
,
sizeof
(
locale
)
-
1
);
lang
=
strtok_r
(
locale
,
"_"
,
&
sp
);
terr
=
strtok_r
(
NULL
,
"."
,
&
sp
);
charset
=
strtok_r
(
NULL
,
"@"
,
&
sp
);
...
...
Please
register
or
sign in
to post a comment