Skip to content
This repository has been archived by the owner on Nov 18, 2022. It is now read-only.

Commit

Permalink
#137: transcode file names read from articles
Browse files Browse the repository at this point in the history
File names which were read from downloaded articles (yEnc) are now
transcoded from Latin1 to UTF8.
  • Loading branch information
hugbug committed Dec 29, 2015
1 parent a9181d8 commit 5df8f73
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions daemon/nntp/Decoder.cpp
Expand Up @@ -171,7 +171,7 @@ int YDecoder::DecodeBuffer(char* buffer, int len)
pb += 6; //=strlen(" name=")
char* pe;
for (pe = pb; *pe != '\0' && *pe != '\n' && *pe != '\r'; pe++) ;
m_articleFilename.Set(pb, pe - pb);
m_articleFilename = WebUtil::Latin1ToUtf8(CString(pb, pe - pb));
}
pb = strstr(buffer, " size=");
if (pb)
Expand Down Expand Up @@ -279,7 +279,7 @@ int UDecoder::DecodeBuffer(char* buffer, int len)
// extracting filename
char* pe;
for (pe = pb; *pe != '\0' && *pe != '\n' && *pe != '\r'; pe++) ;
m_articleFilename.Set(pb, pe - pb);
m_articleFilename = WebUtil::Latin1ToUtf8(CString(pb, pe - pb));

m_body = true;
return 0;
Expand Down

0 comments on commit 5df8f73

Please sign in to comment.