Unicode character display


#1

fwupd 1.3.1 started to display several unicode characters quite regularly (└─, ├─, │ ). However in the (classic) snap these characters show up as “?” symbols. I’m not really sure how to avoid this, any advice?

To demonstrate what happens:

XPS 13 7390
?
??XPS 7390 Thunderbolt Controller:
?     Device ID:           f78dd6bb609522e31f1ff2ff819827108606d18a
?     Summary:             Unmatched performance for high-speed I/O
?     Current version:     41.01
?     Vendor:              Dell (TBT:0x00D4)
?     Flags:               internal|updatable|require-ac|registered
?     GUID:                7d538854-204d-51b2-8f9d-1fe881c70200
?   
??PC601 NVMe SK hynix 512GB:
?     Device ID:           c6a0cfba7c7d81e253fce571e1d1e9f6003ae1c7
?     Summary:             NVM Express Solid State Drive
?     Current version:     80002111
?     Vendor:              SK hynix (NVME:0x1C5C)
?     Flags:               internal|updatable|require-ac|registered|needs-reboot|no-auto-instance-ids
?     GUIDs:               f5396862-8816-5437-823e-d7899a32e667
?                          dff8f310-d5db-11e8-9f8b-f2801f1b9fd1
?   
??System Firmware:
?     Device ID:           b6c08fb9e5384d9d101853cc1ca20cf0ce2df2e2
?     Current version:     0.1.1.1
?     Minimum Version:     0.1.1.1
?     Vendor:              Dell Inc.
?     Flags:               internal|updatable|require-ac|registered|needs-reboot
?     GUID:                cbe49cca-492b-93e8-b0f4-f693501f271b
?   
??TPM 2.0:
      Device ID:           c56e9f77cfee65151bdef90310776f9d62827f5a
      Summary:             Platform TPM device
      Current version:     7.2.1.0
      Vendor:              Dell Inc.
      Update Error:        Updating disabled due to TPM ownership
      Flags:               internal|require-ac|registered
      GUIDs:               a4352c96-f8d7-526c-8485-7f84085f348e
                           7d65b10b-bb24-552d-ade5-590b3b278188
                           6f5ddd3a-8339-5b2a-b9a6-cf3b92f6c86d
                           fe462d4a-e48f-5069-9172-47330fc5e838

versus

XPS 13 7390
│
├─XPS 7390 Thunderbolt Controller:
│     Device ID:           f78dd6bb609522e31f1ff2ff819827108606d18a
│     Summary:             Unmatched performance for high-speed I/O
│     Current version:     41.01
│     Vendor:              Dell (TBT:0x00D4)
│     Flags:               internal|updatable|require-ac|registered
│   
├─PC601 NVMe SK hynix 512GB:
│     Device ID:           c6a0cfba7c7d81e253fce571e1d1e9f6003ae1c7
│     Summary:             NVM Express Solid State Drive
│     Current version:     80002111
│     Vendor:              SK hynix (NVME:0x1C5C)
│     Flags:               internal|updatable|require-ac|registered|needs-reboot|no-auto-instance-ids
│   
├─System Firmware:
│     Device ID:           b6c08fb9e5384d9d101853cc1ca20cf0ce2df2e2
│     Current version:     0.1.1.1
│     Minimum Version:     0.1.1.1
│     Vendor:              Dell Inc.
│     Flags:               internal|updatable|require-ac|registered|needs-reboot
│   
└─TPM 2.0:
      Device ID:           c56e9f77cfee65151bdef90310776f9d62827f5a
      Summary:             Platform TPM device
      Current version:     7.2.1.0
      Vendor:              Dell Inc.
      Update Error:        Updating disabled due to TPM ownership
      Flags:               internal|require-ac|registered

#2

What happens if, “inside” the snap, you set LC_ALL=C.UTF-8?


#3

As in like this?

# snap run --shell fwupd.fwupdmgr
# LC_ALL=C.UTF-8 /snap/bin/fwupd.fwupdmgr get-devices

Same output :confused:


#4

Sorry, I meant something like

apps:
  fwupd:
    environment:
      LC_ALL: C.UTF-8

in the yaml


#5

I just tried that (diff below), no difference.

diff --git a/snap/snapcraft.yaml b/snap/snapcraft.yaml
index 56dfa9d1..d8de6008 100644
--- a/snap/snapcraft.yaml
+++ b/snap/snapcraft.yaml
@@ -23,6 +23,8 @@ apps:
     command: fwupd.wrapper
     daemon: simple
   fwupdmgr:
+    environment:
+      LC_ALL: C.UTF-8
     command: fwupdmgr.wrapper
     completer:
       share/bash-completion/completions/fwupdmgr

#6

I can’t really explain why, but we switched the snap to core18 and this seems to have gone away…