3

This isn't a particularly major issue, but I've had this thing nagging me for a while. When looking at QGIS 3.4's global variables, user_full_name is assigned my given and surname, which includes a diaeresis (¨) somewhere in there. I can't seem to find any way to get QGIS to switch/adapt encoding and display the name correctly. The accented character gets switched to that ubiquitous black rhombus.

I looked for info on this behavior and found moderately similar issues like this and this but it's not exactly the same problem as it's not a geodata encoding issue but rather how QGIS deals with values pulled from the OS.

I have tried unchecking the Override system locale tickbox in Options|General as I prefer to use American English even though my OS is set to Canadian French. No effect to observe.

There's somewhat of a workaround right now which is to fix the name in the Project variable project_author as it is editable (it's filled with the offending global variable by default).

I'm curious to know, though, if someone has encountered this before and if there's a solution in QGIS.

3

After some more digging since yesterday when I posted the question, I feel this is rooted in QGIS 3's core and more suited for the QGIS issue tracker. The problem isn't solved, but it's not fully in the scope of GIS:SE.

My first reflex was to take a look at Windows 10's language settings and I found this checkbox (seems to switch Windows' encoding to UTF-8) buried in Region | Administrative (tab) | Change system locale (dialog) : enter image description here

After restarting, I noticed tons of MS-specific things were borked, like cmd.exe and Powershell not handling special characters. But when I opened QGIS 3.4, the variable showed the special character correctly.

I then started looking in the issue tracker and noticed these two reports:

The python console does not run files with special characters in the filename (character encoding issue)

Project which are saved with special characters in the filename and with the qgz extension are blank

The first question mentioned how it was only since QGIS 3 so while Windows was still running in beta utf-8 mode, I fired up QGIS 2.18. The global variable user_full_name was displayed incorrectly, the special character mangled. Clearing the checkbox in Windows settings and restarting the computer, 2.18 now worked correctly and 3.4 was back to the problem as initially.

So in conclusion, it seems QGIS 3 changed how character encoding is handled and it has slight effects in various areas as observed from the issues raised in the tracker. Now I just need to see if this warrants me adding another issue or not.

3
  • Did you end up following this up in the issue tracker, Gabriel? This affects other non-layer text, like plain text color ramps. It's difficult to share color ramps that contain non-ASCII characters between Windows and Mac users, for example, without encoding issues.
    – jimjamslam
    Oct 16 '20 at 6:34
  • 1
    @rensa No, I haven't. It wasn't critical enough for me to pursue the matter further and just hoped the already submitted tickets would be adressed. You just renewed my curiosity though!
    – Gabriel
    Oct 16 '20 at 20:32
  • No worries! I might submit one on GitHub and see how it goes :)
    – jimjamslam
    Oct 19 '20 at 9:24

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.