cancel
Showing results for 
Search instead for 
Did you mean: 

Problem with character encoding when uploading an app

oathmind
Champ on-the-rise
Champ on-the-rise

Activiti 1.5.X

When i upload a app definition with process, forms, and stencils. If ani element.. for example a field name of a form contains extrange characters like accents, they upload inccorecly, for examlpe "Número" -> ""Número".

Otherwise if i upload the form directly in the forms tab (not insede a app) the charset is correct.

Any idea?

1 ACCEPTED ANSWER

oathmind
Champ on-the-rise
Champ on-the-rise

Hi,

SOLUTION:

yesterday finally i find the solution.

The problem is with the filesystem on my windows is not UTF-8 by default, and the tomcat instalacion is on windows.

To solve that we simply put this property to the JVM:
-Dfile.encoding=UTF-8

And now i import the accents ok.

But now I find another problem with accents... I will open another question for that I link here to avoid cross topics.

The summary is if I download an app with one of the files have an accent on the filename, if i unzip the file and zip it again and try to upload give me an upload error:
08:53:55,516 [http-nio-8080-exec-4] ERROR com.activiti.service.editor.AlfrescoAppDefinitionService - Error reading app definition zip file
java.lang.IllegalArgumentException: MALFORMED
at java.util.zip.ZipCoder.toString(ZipCoder.java:58)
at java.util.zip.ZipInputStream.readLOC(ZipInputStream.java:300)
at java.util.zip.ZipInputStream.getNextEntry(ZipInputStream.java:122)

Link to this problem Question: Error reading app definition zip file (with accents chars) 

View answer in original post

2 REPLIES 2

jearles
Star Contributor
Star Contributor

Hmmm... I've tried to replicate this in Activiti 1.5.X without any success.
This was my validation process:
1) Create process model with a basic flow including a form.
2) Create form in the process editor and added 2 display fields both using special characters: 'Thîß field hæs special characters' & 'This fįęld does too'
3) Export the saved process model; Checking the file to make sure exports came out appropriately
4) Import into a separate clean account; Checking field names after the import.

In both places the characters stayed as specified, including within the database table containing the form and process data. Is there any other helpful information surrounding this that you could provide? Perhaps you've specified an encoding that doesn't support special characters in the same way?

-JEarles

oathmind
Champ on-the-rise
Champ on-the-rise

Hi,

SOLUTION:

yesterday finally i find the solution.

The problem is with the filesystem on my windows is not UTF-8 by default, and the tomcat instalacion is on windows.

To solve that we simply put this property to the JVM:
-Dfile.encoding=UTF-8

And now i import the accents ok.

But now I find another problem with accents... I will open another question for that I link here to avoid cross topics.

The summary is if I download an app with one of the files have an accent on the filename, if i unzip the file and zip it again and try to upload give me an upload error:
08:53:55,516 [http-nio-8080-exec-4] ERROR com.activiti.service.editor.AlfrescoAppDefinitionService - Error reading app definition zip file
java.lang.IllegalArgumentException: MALFORMED
at java.util.zip.ZipCoder.toString(ZipCoder.java:58)
at java.util.zip.ZipInputStream.readLOC(ZipInputStream.java:300)
at java.util.zip.ZipInputStream.getNextEntry(ZipInputStream.java:122)

Link to this problem Question: Error reading app definition zip file (with accents chars)