GSConnect / gnome-shell-extension-gsconnect

KDE Connect implementation for GNOME
GNU General Public License v2.0
3.23k stars 259 forks source link

Accented/Spanish characters do not display correctly #1160

Open ig-perez opened 3 years ago

ig-perez commented 3 years ago

Accented characters like á or ñ are not translated correctly on the destination Android phone. For example, when sending this text from the computer: image

The Android phone shows the unicode values: image

Steps To Reproduce:

  1. On the computer copy the text to share, for example El año del cañón
  2. On the Android phone, paste the content of the clipboard to a text editor
  3. See error

Expected behavior

The pasted text on the Android phone should'n display the special characters as unicode.

Support Log

GSConnect: 45 (user)
GJS:       16602
Session:   wayland
OS:        Fedora 33 (Workstation Edition)
--------------------------------------------------------------------------------
-- Logs begin at Fri 2021-01-22 16:21:00 -05, end at Tue 2021-08-24 14:44:15 -05. --
Aug 24 14:43:58 wpa_supplicant[1026]: wlo1: CTRL-EVENT-SIGNAL-CHANGE above=1 signal=-63 noise=9999 txrate=115600
Aug 24 14:43:59 gnome-shell[2171]: libinput error: event7  - Logitech Wireless Keyboard PID:4023: client bug: event processing lagging behind by 28ms, your system is too slow
Aug 24 14:43:59 org.gnome.Shell.Extensions.GSConnect[2512]: [/service/device.js:sendPacket:446]: Honor View 10: {
                                                              "id": 1629834239851,
                                                              "type": "kdeconnect.clipboard",
                                                              "body": {
                                                                "content": "El a\\u00f1o del ca\\u00f1\\u00f3n"
                                                              }
                                                            }
Aug 24 14:44:01 org.gnome.Shell.Extensions.GSConnect[2512]: [/service/device.js:_readLoop:338]: Honor View 10: {
                                                              "id": 1629822498982,
                                                              "type": "kdeconnect.connectivity_report",
                                                              "body": {
                                                                "signalStrengths": {
                                                                  "0": {
                                                                    "networkType": "LTE",
                                                                    "signalStrength": 4
                                                                  }
                                                                }
                                                              }
                                                            }
Aug 24 14:44:01 org.gnome.Shell.Extensions.GSConnect[2512]: [/service/device.js:handlePacket:417]: Honor View 10: "Unsupported packet type (kdeconnect.connectivity_report)"
Aug 24 14:44:03 org.gnome.Shell.Extensions.GSConnect[2512]: [/service/device.js:_readLoop:338]: Honor View 10: {
                                                              "id": 1629822498982,
                                                              "type": "kdeconnect.connectivity_report",
                                                              "body": {
                                                                "signalStrengths": {
                                                                  "0": {
                                                                    "networkType": "LTE",
                                                                    "signalStrength": 4
                                                                  }
                                                                }
                                                              }
                                                            }
Aug 24 14:44:03 org.gnome.Shell.Extensions.GSConnect[2512]: [/service/device.js:handlePacket:417]: Honor View 10: "Unsupported packet type (kdeconnect.connectivity_report)"
Aug 24 14:44:05 org.gnome.Shell.Extensions.GSConnect[2512]: [/service/device.js:sendPacket:446]: Honor View 10: {
                                                              "id": 1629834245273,
                                                              "type": "kdeconnect.systemvolume",
                                                              "body": {
                                                                "sinkList": [
                                                                  {
                                                                    "name": "alsa_output.pci-0000_00_1f.3.analog-stereo",
                                                                    "description": "Speakers (Built-in Audio Analog Stereo)",
                                                                    "muted": false,
                                                                    "volume": 41944,
                                                                    "maxVolume": 65536
                                                                  },
                                                                  {
                                                                    "name": "alsa_output.pci-0000_00_1f.3.analog-stereo.echo-cancel",
                                                                    "description": "Built-in Audio Analog Stereo (echo cancelled with Built-in Audio Analog Stereo)",
                                                                    "muted": false,
                                                                    "volume": 41944,
                                                                    "maxVolume": 65536
                                                                  }
                                                                ]
                                                              }
                                                            }
Aug 24 14:44:05 org.gnome.Shell.Extensions.GSConnect[2512]: [/service/device.js:sendPacket:446]: Honor View 10: {
                                                              "id": 1629834245349,
                                                              "type": "kdeconnect.systemvolume",
                                                              "body": {
                                                                "sinkList": [
                                                                  {
                                                                    "name": "alsa_output.pci-0000_00_1f.3.analog-stereo",
                                                                    "description": "Speakers (Built-in Audio Analog Stereo)",
                                                                    "muted": false,
                                                                    "volume": 41944,
                                                                    "maxVolume": 65536
                                                                  },
                                                                  {
                                                                    "name": "alsa_output.pci-0000_00_1f.3.analog-stereo.echo-cancel",
                                                                    "description": "Built-in Audio Analog Stereo (echo cancelled with Built-in Audio Analog Stereo)",
                                                                    "muted": false,
                                                                    "volume": 41944,
                                                                    "maxVolume": 65536
                                                                  }
                                                                ]
                                                              }
                                                            }
Aug 24 14:44:05 org.gnome.Shell.Extensions.GSConnect[2512]: [/service/device.js:sendPacket:446]: Honor View 10: {
                                                              "id": 1629834245353,
                                                              "type": "kdeconnect.systemvolume",
                                                              "body": {
                                                                "sinkList": [
                                                                  {
                                                                    "name": "alsa_output.pci-0000_00_1f.3.analog-stereo",
                                                                    "description": "Speakers (Built-in Audio Analog Stereo)",
                                                                    "muted": false,
                                                                    "volume": 41944,
                                                                    "maxVolume": 65536
                                                                  },
                                                                  {
                                                                    "name": "alsa_output.pci-0000_00_1f.3.analog-stereo.echo-cancel",
                                                                    "description": "Built-in Audio Analog Stereo (echo cancelled with Built-in Audio Analog Stereo)",
                                                                    "muted": false,
                                                                    "volume": 41944,
                                                                    "maxVolume": 65536
                                                                  }
                                                                ]
                                                              }
                                                            }
Aug 24 14:44:08 org.gnome.Shell.Extensions.GSConnect[2512]: [/service/device.js:_readLoop:338]: Honor View 10: {
                                                              "id": 1629834248174,
                                                              "type": "kdeconnect.notification",
                                                              "body": {
                                                                "id": "0|org.thoughtcrime.securesms|827353982|null|10123",
                                                                "isCancel": true
                                                              }
                                                            }
Aug 24 14:44:09 org.gnome.Shell.Extensions.GSConnect[2512]: [/service/device.js:_readLoop:338]: Honor View 10: {
                                                              "id": 1629822498982,
                                                              "type": "kdeconnect.connectivity_report",
                                                              "body": {
                                                                "signalStrengths": {
                                                                  "0": {
                                                                    "networkType": "LTE",
                                                                    "signalStrength": 4
                                                                  }
                                                                }
                                                              }
                                                            }
Aug 24 14:44:09 org.gnome.Shell.Extensions.GSConnect[2512]: [/service/device.js:handlePacket:417]: Honor View 10: "Unsupported packet type (kdeconnect.connectivity_report)"
Aug 24 14:44:15 org.gnome.Shell.Extensions.GSConnect[2512]: [/service/device.js:_readLoop:338]: Honor View 10: {
                                                              "id": 1629822498982,
                                                              "type": "kdeconnect.connectivity_report",
                                                              "body": {
                                                                "signalStrengths": {
                                                                  "0": {
                                                                    "networkType": "LTE",
                                                                    "signalStrength": 3
                                                                  }
                                                                }
                                                              }
                                                            }
Aug 24 14:44:15 org.gnome.Shell.Extensions.GSConnect[2512]: [/service/device.js:handlePacket:417]: Honor View 10: "Unsupported packet type (kdeconnect.connectivity_report)"

System Details:

GSConnect environment:

Additional Notes: The problem doesn't happen backwards (copying accented characters in the phone and pasting the text in the computer).

andyholmes commented 3 years ago

Thanks for reporting with good logs :)

I'm not sure about the cause here, but it's definitely a bug in GSConnect.

santiagocezar commented 3 years ago

I can reproduce this on Wayland, but not on Xorg. And by calling the SetText DBus method with "cañón" as the text it's send to the phone correctly.

I guess the problem is in the way that it gets the clipboard content from Shell. I tried looking at the code but I wasn't able to figure out how does it work :/.

careca1970 commented 2 years ago

I have maybe similar problem, but not exactly the same. One tries to type in accented characters (dead acute, dead tilde, etc.), but the characters just don't get accented, or does not show. On pasting text into the "text input field" nothing seems to happen.

I am on Fedora 35 (gnome 41) and Xorg.

jgrocha commented 2 years ago

Here on: GSConnect: 47 (user) GJS: 16804 Session: x11 OS: Ubuntu 21.10

I can send accented characters using copy and paste from the desktop to the mobile. But I can not write down accented characters on the Keyboard window.

All characters (non-accented) written on the Keyboard window are passed to the mobile. Good.

But if I write and accented character (composed character), the character is displayed on the Keyboard window and it is not sent to the mobile.

Screenshot from 2022-06-02 12-15-27

Like in the screenshot above, all other characters were sent to the mobile. The composed one, was not sent.

Everything works fine with ascii and non composed characters, like ç.