You are not logged in.

#1 2023-09-21 07:33:48

archqt
Member
Registered: 2015-04-29
Posts: 182

Error on locale encoding [Solved]

Hi,
on QtCreator i have this error

Detected system locale encoding (ANSI_X3.4-1968, locale "") is not UTF-8.

Here is the output of the locale command

LANG=fr_FR.UTF-8
LC_CTYPE="fr_FR.UTF-8"
LC_NUMERIC="fr_FR.UTF-8"
LC_TIME="fr_FR.UTF-8"
LC_COLLATE=C
LC_MONETARY="fr_FR.UTF-8"
LC_MESSAGES="fr_FR.UTF-8"
LC_PAPER="fr_FR.UTF-8"
LC_NAME="fr_FR.UTF-8"
LC_ADDRESS="fr_FR.UTF-8"
LC_TELEPHONE="fr_FR.UTF-8"
LC_MEASUREMENT="fr_FR.UTF-8"
LC_IDENTIFICATION="fr_FR.UTF-8"
LC_ALL=

locale.conf

cat /etc/locale.conf 
LANG=C.UTF-8
LANGUAGE=fr_FR:en_US
LC_COLLATE=C

Is there a way to avoid this error ?
Thanks

Last edited by archqt (2023-10-03 20:11:57)

Offline

#2 2023-09-21 08:57:32

Lone_Wolf
Forum Moderator
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 11,961

Re: Error on locale encoding [Solved]

This is  a support forum, new threads have a atleast a 99.9% chance of not being solved at start.
Please remove [Not Solved] from the thread title.

Your LANG value looks wrong, see https://wiki.archlinux.org/title/Locale … tem_locale

Last edited by Lone_Wolf (2023-09-21 08:57:59)


Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.


(A works at time B)  && (time C > time B ) ≠  (A works at time C)

Offline

#3 2023-09-21 14:50:14

archqt
Member
Registered: 2015-04-29
Posts: 182

Re: Error on locale encoding [Solved]

I have LANG=fr_FR.UTF-8
Why it is wrong ?

Offline

#4 2023-09-21 15:18:54

seth
Member
Registered: 2012-09-03
Posts: 51,648

Re: Error on locale encoding [Solved]

/etc/locale.conf has LANG=C.UTF-8 - you're most likely overriding that in some bashrc
ANSI_X3.4-1968 is some archaic ASCII and most likely refers to some invalid locale, C.UTF-8 is technically legal since some glibc versions, but maybe qt-creator has a different opinion.

Also see https://wiki.archlinux.org/title/KDE#Pl … e_settings
Otherwise: is qt-creator from the repo or some flatschpak?

Offline

#5 2023-09-21 15:40:38

archqt
Member
Registered: 2015-04-29
Posts: 182

Re: Error on locale encoding [Solved]

seth wrote:

/etc/locale.conf has LANG=C.UTF-8 - you're most likely overriding that in some bashrc
ANSI_X3.4-1968 is some archaic ASCII and most likely refers to some invalid locale, C.UTF-8 is technically legal since some glibc versions, but maybe qt-creator has a different opinion.

Also see https://wiki.archlinux.org/title/KDE#Pl … e_settings
Otherwise: is qt-creator from the repo or some flatschpak?

Qt is installed with the QtMaintenance Tool, not with the package on arch.
I have deleted .config/plasma-localerc and login again here is the content

cat .config/plasma-localerc 
[Formats]
LANG=fr_FR.UTF-8

Thanks

Offline

#6 2023-09-21 15:57:50

seth
Member
Registered: 2012-09-03
Posts: 51,648

Re: Error on locale encoding [Solved]

1. did you "fix" the LANG in /etc/locale.conf?
2.

Qt is installed with the QtMaintenance Tool, not with the package on arch.

"Why"?

Offline

#7 2023-09-21 17:23:27

archqt
Member
Registered: 2015-04-29
Posts: 182

Re: Error on locale encoding [Solved]

seth wrote:

1. did you "fix" the LANG in /etc/locale.conf?
2.

Qt is installed with the QtMaintenance Tool, not with the package on arch.

"Why"?

I have this, and i don't know what to change

cat /etc/locale.conf 
LANG=fr_FR.UTF-8
LANGUAGE=fr_FR
LC_COLLATE=C

I need Android packages or other tools that are not in archpackages that is why i use QtMaintenanceTool to install QtCreator and all libs for Qt Development

Offline

#8 2023-09-21 21:23:10

seth
Member
Registered: 2012-09-03
Posts: 51,648

Re: Error on locale encoding [Solved]

Please try qtcreator from the repos to see whether the problem comes from the bundled Qt - as mentioned, C.UTF-8 wasn't legal in older glibc versions, so that's rather relevant.

Also, you apparently edited /etc/locale.conf, but did you reboot afterwards (you'll at least have to restart the session to get the other locale out of the environment where qtcreator might pick it up)

Offline

#9 2023-09-22 06:17:45

archqt
Member
Registered: 2015-04-29
Posts: 182

Re: Error on locale encoding [Solved]

seth wrote:

Please try qtcreator from the repos to see whether the problem comes from the bundled Qt - as mentioned, C.UTF-8 wasn't legal in older glibc versions, so that's rather relevant.

Also, you apparently edited /etc/locale.conf, but did you reboot afterwards (you'll at least have to restart the session to get the other locale out of the environment where qtcreator might pick it up)

Same problem with qtcreator from the repos.
Yes i rebooted afterwards

Offline

#10 2023-09-22 06:27:10

seth
Member
Registered: 2012-09-03
Posts: 51,648

Re: Error on locale encoding [Solved]

localectl
locale -a
locale

If you still have some bundled stuff around, make sure you're not picking that up somehow.
The qt libraries are much more relevant than the client binary.
https://man.archlinux.org/man/core/man- … n#LD_DEBUG

LD_DEBUG=libs qtcreator

For a fringe bug in qtcreator, try to set LC_COLLATE to fr_FR.UTF-8

Offline

#11 2023-09-26 19:01:54

archqt
Member
Registered: 2015-04-29
Posts: 182

Re: Error on locale encoding [Solved]

seth wrote:
localectl
locale -a
locale

If you still have some bundled stuff around, make sure you're not picking that up somehow.
The qt libraries are much more relevant than the client binary.
https://man.archlinux.org/man/core/man- … n#LD_DEBUG

LD_DEBUG=libs qtcreator

For a fringe bug in qtcreator, try to set LC_COLLATE to fr_FR.UTF-8

Same problem on another computer, and some people talks about this on Qt Forum, so maybe it is simply a bug. When i will have more free time i will try to see a little more.
I will wait for next release in 2 weeks if roadmap is respected.
Another version of QtCreator 11.0.3 is released. I downloaded it and...it works fine now, so it was a bug from QtCreator.
Thanks for all help

Last edited by archqt (2023-10-03 20:13:14)

Offline

Board footer

Powered by FluxBB