mirror of
https://github.com/jenkinsci/jenkins.git
synced 2026-11-17 05:52:26 +00:00
set the encoding to UTF-8
git-svn-id: https://hudson.dev.java.net/svn/hudson/trunk/hudson/main@31566 71c3de6d-444a-0410-be80-ed276b4c234a
This commit is contained in:
1 parent
027edac3a7
commit
68a78d2f3c
1 file changed
+2
-2
@@ -146,13 +146,13 @@ public class Api extends AbstractModelObject {
|
||||
OutputStream o = rsp.getCompressedOutputStream(req);
|
||||
try {
|
||||
if(result instanceof CharacterData) {
|
||||
rsp.setContentType("text/plain");
|
||||
rsp.setContentType("text/plain;charset=UTF-8");
|
||||
o.write(((CharacterData)result).getText().getBytes("UTF-8"));
|
||||
return;
|
||||
}
|
||||
|
||||
if(result instanceof String || result instanceof Number || result instanceof Boolean) {
|
||||
rsp.setContentType("text/plain");
|
||||
rsp.setContentType("text/plain;charset=UTF-8");
|
||||
o.write(result.toString().getBytes("UTF-8"));
|
||||
return;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user