German special chars (äüöß) will be replaced by "?"

Hi,

after updating Lucee from version 6.0.1.83/6.0.2.45 to 6.1.0.243 we get the following error:
German special characters (äüöÄÜÖß) are replaced by “?” on form submit. Same for url-parameters.

Is there a way we can fix the problem?

Br
Marc

OS: Ubuntu 20.04.6 LTS (GNU/Linux 5.4.0-196-generic x86_64)
Java Version: 11.0.7 (AdoptOpenJDK) 64bit
Tomcat Version: Apache Tomcat/9.0.35
Lucee Version: Lucee 6.1.0.243

Please post some code as an example, so we can reproduce it quickly.

1 Like

Hi Andreas,

hope that helps.

Br
Marc

Everything is fine in versions before “6.1.0.243” e.g. “6.0.2.45”
result__ver_6.0.2.45

After update to version “6.1.0.243”
result_ver_6.1.0.243

sample_form_url_variables_not_working.cfm (481 Bytes)

hi, no problem here with the docker Lucee version 6.1.0.243.

<cfdump var="#form#" label="">
<form method="post">
    <input type="text" name="char" value="äüöÄÜÖß">
    <button>OK</button>
</form>

is your file saved in UTF8 ?

Thierry

Hi Thierry,

yes, the file is saved in UTF-8.

I only need to switch the installed Lucee version in section Extension - Applications (Lucee-Administration). In our environments there is only a difference in the new Lucee version.
Version “6.1.0.243” is not working, other versions before are working fine.

Br
Marc

make sure the font for the language you want supported is installed on the os and / or in the path for Tomcat.

works fine for me.

As we can see in the screenshot, the Umlaute are proper stored into the class file. so the problem is with sending the data out or receiving them.
So i guess the problem is that the “charset” did change, best dump the following to see what charset is used.
<cfdump var="#getApplicationSettings().charset#">

1 Like

Hi Michael,

thank you for your support. The charset is “UTF-8” but the characters are replaced by “?”.

Br
Marc

charset_output

After the update, one of our functions no longer works correctly. I still have to find out the exact reason. But that’s our problem. Sorry for trouble and thanks for your support.

Found it!

<cfdump var="#URLDecode("äöüßÄÜÖ€")#">
<cfdump var="#URLDecode("äöüßÄÜÖ€", "UTF-8")#">

Before update to version 6.1.0.243: the result was “äöüßÄÜÖ€” now it’s “???..”.

As Micha already verified, there is probably something not correctly setup along your encodings. A possible hint can be this post that might help you:

Hi Andreas,

I used now a clean and new Lucee docker-container. The installed Lucee version will be “6.0*”

Dockerfile:

FROM lucee/lucee

After that I created an “index.cfm” within “/var/www/” directory.

index.cfm

<cfdump var="#URLDecode("äöüßÄÜÖ€")#">
<cfdump var="#URLDecode("äöüßÄÜÖ€", "UTF-8")#">

The page shows that result: “äöüßÄÜÖ”.

After that I’ve imported a new created “password.txt” file to visit the Lucee admin page. Then I updated to Lucee version “6.1*”.

The result now is “???..”

The character encoding of the “index.cfm” file ist “UTF-8” (checked by uchardet index.cfm).

Hope, that finally helps.

Cheers
Marc

I use “UTF-8 with BOM”.
I remember making this setting (“with BOM”) in my editor because I was having problems without it.

that is also not the problem, the the input field shows the umlaut correctly in your screenshoot, i will dig deeper.

1 Like

on docker i see the issue with URLDecode, but the form still works fine

my code

<cfprocessingdirective pageencoding="UTF-8">
äöüßÄÜÖ€
<cfdump var="#URLDecode("äöüßÄÜÖ€")#">
<cfdump var="#URLDecode("äöüßÄÜÖ€", "UTF-8")#">

<cfdump var="#form#" label="">
<form method="post">
    <input type="text" name="char" value="äüöÄÜÖß">
    <button>OK</button>
</form>

the output
Screenshot 2024-10-14 at 17.11.28

i have created a ticket for it
https://luceeserver.atlassian.net/browse/LDEV-5107

2 Likes

@mhuebner problem is that the url decoder no longer allows umlauts as inputs (what i’m about to change; see details in ticket), the reason you see this issue with the form and others not, is because of the browser you are using, some browser do automatically encode non ascii characters in the url, others do not. Try another browser and it will work. i use chrome.

issue is fixed
https://luceeserver.atlassian.net/browse/LDEV-5107

2 Likes

@micstriit great. Thank you.