edgetx icon indicating copy to clipboard operation
edgetx copied to clipboard

Character set bug when transferring between radio and companion

Open Freddan-67 opened this issue 1 year ago • 11 comments

Is there an existing issue for this problem?

  • [X] I have searched the existing issues

What part of EdgeTX is the focus of this bug?

Other (Please specify below)

Current Behavior

The bug happens when transferring models back and forth between firmware and companion (windows). 2.9.3 in both firmware and companion I got a model label called "Sjö" (swedish for sea as in seaplane) When transferring to companion the label gets duplicated to "SjÃ" and "Sjö". The models gets moved from the label Sjö to "SjÃ". When transferring back to firmware I got two labels instead of one.

Expected Behavior

Labels with international character set is kept intact when transferring back and forth between companion and firmware

Steps To Reproduce

Create a label in the companion with international characters, example "Sjö" Transfer models and settings to the radio Assign a model to that label in the radio Transfer models to companion Two labels exists "SjÃ" and "Sjö"

Version

2.9.3

Transmitter

RadioMaster TX16S / TX16SMK2

Operating System (OS)

Windows

OS Version

Windows 11 64bit

Anything else?

bug-companion-characterset

Freddan-67 avatar Feb 05 '24 08:02 Freddan-67

I suppose I should start with "How did you enter a label of Sjö in the first place?" :laughing:

And then we can work from there...

pfeerick avatar Feb 05 '24 08:02 pfeerick

I suppose I should start with "How did you enter a label of Sjö in the first place?" 😆

And then we can work from there...

I actually don't remember, but as far as I can tell, the only way I can find the possibility to enter international characters is from label manager in EdgeTX Companion, where I can right click, and then Create Label, and freely name it using windows characters. Just to see what i got, I tried "åÅäÄöÖ" for all Swedish int. characters, but then that label placed topmost, and the model selector in EdgeTX got busted and I couldn't even switch model.

I have updated the original description to match the actual use case.

This is how it looks after two more syncs (read models, write models, read models, write models from CompanionTX) EdgeTX_int_chars I think I need to rename that label, because it keeps getting worse.

Ver from command line in windows say "Microsoft Windows [Version 10.0.22621.3007]"

Freddan-67 avatar Feb 05 '24 12:02 Freddan-67

For any developer to test this: Test 1: Create a label "Sjö" as in the description Transfer to the radio Transfer back to the companion Make sure "Sjö" didn't duplicate.

Test 2: Create two models for instance in the companion Right click on label manager and create a label. I placed it first among the labels. Name the label "åÅäÄöÖ" Transfer to the radio Now try the model picker in EdgeTX. Expected behaviour: The model picker can select any model Actual behaviour: The model picker don't work

Freddan-67 avatar Feb 06 '24 07:02 Freddan-67

The radio firmware does not support unicode characters - ASCII only I'm afraid.

Companion should probably be updated to not allow unicode in label / name fields.

philmoz avatar Feb 06 '24 10:02 philmoz

This ugly bug took me 2 hours of my life...had to recreate the complex model from scratch

Eldenroot avatar Feb 15 '24 19:02 Eldenroot

We should disable all non-english characters and symbols in model setting...

Eldenroot avatar Feb 15 '24 19:02 Eldenroot

Hi @philmoz. Companion does have a validator for names however it has been turned of or is inconsistent between fields. Can you please provide me with the currently supported characters for B&W and colour radios. Thanks.

elecpower avatar Feb 19 '24 06:02 elecpower

BW allow only basic character set (English), even for localized firmware

3djc avatar Feb 19 '24 09:02 3djc

As far as I know there is no validation on name entry; but only ASCII characters can be entered on the radio.

philmoz avatar Feb 19 '24 09:02 philmoz

When editing B&W names the radio sim GUI validation only allows space hyphen a-z A-Z 0-9. However as screenshot below from X9D+ they can display an extended set (albeit maybe not all as I have not tested every character possible in colour editor). Should valid B&W character set be extended?

screenshot_tx16s_24-02-20_17-21-55

screenshot_x9d+_24-02-20_17-23-24

Companion validation could be changed to have validation based on the current radio profile ie colour vs B&W.

The next issue is should invalid characters be filtered out when parsing the yaml files?

elecpower avatar Feb 20 '24 06:02 elecpower

A couple more math chars could be added to BW names, not sure they should be tho,

There was a request for '.' that made sense: https://github.com/EdgeTX/edgetx/issues/4618

3djc avatar Feb 20 '24 06:02 3djc