Skip to content

Commit 3804aba

Browse files
author
cetra3
committed
Include UTF-8 Encoding on Prepare & Target JDK1.7
1 parent d0c2569 commit 3804aba

2 files changed

Lines changed: 7 additions & 1 deletion

File tree

repo/build.gradle

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@ buildscript {
1313
apply plugin: 'alfresco-amp'
1414

1515
allprojects {
16+
sourceCompatibility = 1.7
17+
targetCompatibility = 1.7
1618
gradle.projectsEvaluated {
1719
tasks.withType(JavaCompile) {
1820
options.compilerArgs << "-Xlint:unchecked" << "-Xlint:deprecation"
@@ -26,10 +28,12 @@ ext {
2628

2729
}
2830

31+
32+
33+
2934
project.description = "Onlyoffice Integration for Alfresco"
3035
version = "git describe --tags".execute().text.trim()
3136

32-
3337
repositories {
3438
mavenCentral()
3539

repo/src/main/java/com/parashift/onlyoffice/Prepare.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,8 @@ public void execute(WebScriptRequest request, WebScriptResponse response) throws
5454

5555
Map<QName, Serializable> properties = nodeService.getProperties(nodeRef);
5656

57+
response.setContentType("application/json; charset=utf-8");
58+
response.setContentEncoding("UTF-8");
5759

5860
String contentUrl = UrlUtil.getAlfrescoUrl(sysAdminParams) + "/s/api/node/content/workspace/SpacesStore/" + nodeRef.getId() + "?alf_ticket=" + authenticationService.getCurrentTicket();
5961
String key = nodeRef.getId() + "_" + dateFormat.format(properties.get(ContentModel.PROP_MODIFIED));

0 commit comments

Comments
 (0)