Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

incorrect chinese display in mail's subject #928

Closed
WilliamFromTW opened this issue Sep 30, 2015 · 2 comments
Closed

incorrect chinese display in mail's subject #928

WilliamFromTW opened this issue Sep 30, 2015 · 2 comments

Comments

@WilliamFromTW
Copy link
Contributor

screen shot 2015-09-30 at 14 09 04

i noticed that first email envelope(????-??? #4 in attachment) subject show incorrect chinese ,
after modify "com.gitblit.service.MailService.java"
line 199
message.setSubject(mailing.subject);
to
import javax.mail.internet.MimeUtility;
message.setSubject(MimeUtility.encodeText(mailing.subject, "utf-8", "B"));
chinese show perfect (see second envelope #5 in attachment)

this solution can be found in
http://stackoverflow.com/questions/3451256/javamail-changing-charset-of-subject-line

ps. my gitblit server (1.6.2) run on windows server 2008 R2 (english version)

@gitblit
Copy link
Collaborator

gitblit commented Sep 30, 2015

Great. Would you like to open a PR with the fix?

@WilliamFromTW
Copy link
Contributor Author

yes , of course !

2015-09-30 19:22 GMT+08:00 James Moger notifications@github.com:

Great. Would you like to open a PR with the fix?


Reply to this email directly or view it on GitHub
#928 (comment).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants