Encoding problems

Hello,
I am having problems with encoding of czech characters like ěščřžýáíéůú, please se the picture below. The problem is only with strings inside embedded forms, other parts like name of the task and name of the process work fine.

Am I missing some configuration which needs to be set for the task list application to work properly with utf-8?

Thank you

Hi Adam Klima,

I think it is a matter of saving your HTML form file in the correct encoding (UTF-8)
When you save your HTML form file, select he UTF-8 encoding from the Save As dialog box of your editor (for example: Notepad)

That is not my case because the embedded forms I used is auto generated from the <camunda:formField tags.

I had the same problems with the process variables which when loaded in subsequent task have the question marks as well. But this problem seems to be fixed in 7.5 alpha 3.

Any other idea why could this be happening?

It seems it is a server issue…
What kind of camunda installation do you have?

Oh you were fast. I just discovered that in 7.5 alpha 3 the problem with variables doesn’t happen anymore but the problem with generated forms still persists.

I use the jboss docker image jboss-7.5.0-alpha3 with postgresql.

I have been trying several thing trying to fix this issue. I set the LANG variable of the container to both cs_CZ.utf-8 and en_UK.utf-8. I tried to add code below to the project and set following properties to the server config file.

None of those helped i found out that the problem is even with German characters so I guess I should not be the first one to encounter this kind of problem, but I was not able to find anything helpful.

Anyone had problems with jBoss (docker image) and German characters in names of generated form fields?

@Override
    public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) throws ServletException, IOException {
        request.setCharacterEncoding("UTF-8");
        chain.doFilter(request, response);
    }

Properties I set at server config

<system-properties>
    <property name="org.apache.catalina.connector.URI_ENCODING" value="UTF-8"/>
    <property name="org.apache.catalina.connector.USE_BODY_ENCODING_FOR_QUERY_STRING" value="true"/>
</system-properties>

Hi Adam,

could you share your BPMN file? And do you use an own docker image or the community image? Do you have the same issues using the prepackaged distro without docker?

Cheers,
Sebastian

Hi Sebastian,
I use the community docker image. Please see my bpmn file bellow.

I haven’t tried the prepacked version yet but that probably is the nex step. :wink:

Thank you

preruseni.bpmn (17.8 KB)

Hi Adam,

the problem is the default java file encoding in the container. I created a issue to set it to UTF-8.

Till I fixed this you could set the following environment variable during the jboss container start:

-e PREPEND_JAVA_OPTS='-Djboss.bind.address=0.0.0.0 -Djboss.bind.address.management=0.0.0.0 -Dfile.encoding=UTF-8'

So for example run the container with:

docker run -d --name camunda -it -p 8080:8080 -e PREPEND_JAVA_OPTS='-Djboss.bind.address=0.0.0.0 -Djboss.bind.address.management=0.0.0.0 -Dfile.encoding=UTF-8' camunda/camunda-bpm-platform:jboss-7.5.0-alpha3

adding the additional environment variables you need for the postgresql etc.

Cheers,
Sebastian

Hi Adam,

I just discovered the JAVA_TOOL_OPTIONS environment variable. So this should be enough:

-e JAVA_TOOL_OPTIONS="-Dfile.encoding=UTF-8"

Cheers,
Sebastian

1 Like

Thank you very much it works like a charm.

Best regards
Adam

Hi,

I pushed a fix to all images. They are already available at docker hub. So if you update
your local image the workaround shouldn’t be needed anymore.

Cheers,
Sebastian

Hello,

I have the same issue with image 7.6.0-alpha5 (Tomcat) as described Adam. As you said, you fixed that problem in all images. But for me it doesnt work. Do you have any idea how to fix this?

Best regards,
Alex

Hi Alex,

can you share the process modele which does not work? Or specify how to reproduce your error?

Cheers,
Sebastian

Thank you for fast reply

here the process,

F15-1-stable.bpmn (20.6 KB)

Resolved the problem by setting JAVA_OPTS variable on -Dfile.encoding=UTF-8 in setenv.bat

But dont know if its safe and correct fix, so still waiting on your recomendation :slight_smile:

Hi @menski i have the sam issue, but environment variable doesn’t help me do you have any different idea how can i solve this problem ?
here is my question link :https://forum.camunda.io/t/cant-send-non-english-text-via-camunda/6738