Non-latin characters in project name

In sonar-project.properties file I have provided project name using non-latin characters.

sonar.projectName=जावा ऐप

Sonarqube is not able to parse those characters and project name is set to gibberish as shown in below screenshot.

This behaviour is from SonarQube v10.4.1 This looks like a bug to me.

Regards,
Vinod

1 Like

Hi Vinod!

Thanks for the report, it indeed looks like a bug, we are investigating it.
Just to be sure, was it working for you before SQ v10.4.1?

Hello Grégoire,

I never tried this one in previous versions.

Regards,
Vinod

We have not been able to reproduce the bug so far, and using the string जावा ऐप works fine on our latest SQ version (v10.5).

Could you share how you created this project? Using the UI? Some API call? Or through the scanner with directly doing a first analysis?

I’m also wondering if it could come from your DB configuration?

Hello Vinod,

We tried to create the same project via the web interface and had no issues. So the issue is either on the back-end side of SonarQube or on your side.

Have you made sure your sonar-project.properties is encoded in UTF-8?
What about your database, does it support any encoding or does it have restrictions?

Thanks

image

Hello Grégoire and David,

We are using PostgreSQL 15.6 with UTF-8 encoding. Below is the command that is used to create the database.

CREATE DATABASE sonarqube WITH TEMPLATE = template0 ENCODING = 'UTF8' LOCALE_PROVIDER = libc LOCALE = 'C.UTF-8';

Attached file non-latin-name.zip (30.1 KB) contains the sample project that replicates the bug.

Another noteworthy information here is that, I used sonar-scanner to run the analysis, which creates the project as well.

sonar-scanner-5.0.1.3006-macosx/bin/sonar-scanner -Dsonar.token=TOKEN -Dsonar.host.url=SERVER_URL

Hope this will help to reproduce the bug.

Regards,
Vinod

2 Likes

Hi Vinod,

Thank you for your report. I have reproduced the issue locally and created a ticket for it: [SONAR-22114] - Jira .

The issue doesn’t seem to be related to database settings but rather to scanner software. Please watch the updates on the ticket if you are interested in the fix.

1 Like

It seems to be an old bug, that should be fixed by using jre 9+:

I confirm that I still have the problem with Sonar Version 9.9.4 (build 87374) (Java 17.0.11) and a sonar-project.properties encoded with utf-8 (not latin-1 / ISO-8859-1):

sonar.projectName="Test accentué É 😁" => "Test accentué É 😁"
sonar.projectDescription="utf-8 é`èçàÉÈÀàùöï😀🍟" => "utf-8 é`èçà ÉÈÀà ùöï😀🍟"