Ticket Created
over 3 years ago

CIQQA-1299

Strings in FIT file are cut in half for non-ASCII unicode characters

When I set my field to 8 characters, I can indeed enter and save 8 ASCII characters:

<setting propertyKey="@Properties.n" title="@Strings.settingsSaveAlias">
    <settingConfig type="alphaNumeric" maxLength="8"/>
</setting>
(BTW it's not clear from the documentation, whether the count is in characters or bytes..., but turns out (and it is logical) that maxLength is counted in unicode characters)
When I enter "ABCDEFGH" then I'll see this saved and displayed on the DF's screen.
When I enter "אבגדהוזח" then I also see the 8 Hebrew characters on the screen.
But when I save the same string to a string field in the fit file then the Hebrew string is always cut in half:
mAntNameField = dataField.createField("n", 8, Fit.DATA_TYPE_STRING, { :count=>17, :mesgType=>Fit.MESG_TYPE_SESSION });
(BTW it's not clear from the documentation, whether the count is in characters or bytes...)
I set :count to 17 (that should be plenty enough, because the unicode representation of Hebrew characters are 16 bit, so it should be enough for 8 characters + null)
Then in the fit file (at least in what I see in GCM and GCW) from the ASCII string all the 8 characters are displayed, but from the Hebrew string only 4 characters out of the 8:
entered: "אבגדהוזח" but only got back: "אבגד"
At 1st I thought that this might happen because it uses some different encoding, so maybe each Hebrew character takes 4 bytes, but then I tested that too:
I entered "אבגד" but then I only got back "אב". (BTW When I enter "אבג" then I only get back "אב")
Parents
  • You can test it in apps.garmin.com/.../7c83d402-4b68-4f0a-b167-7139788a19b3 by setting a name and record a few seconds of activity (you'll need an ANT HR device, it can be a HRM strap or another watch that is broadcasting)

    You can change the name in the settings to either be a long English text, save the activity and you'll see that the whole length that you typed in was displayed on the DF screen AND was also saved to fit AND is displayed in the activity's stats in GCM

    OR do the same with Hebrew, and you'll see that the name you typed in is indeed displayed on the DF screen, but literally cut in half when you look in GCM.

    I don't know how to check whether the bug is that the Hebrew text is cut in half before it's saved to the fit file or it is saved correctly and the bug is in GCM when displaying.

    If you help me how to get a fit file from GC web and how to look into it then i can check.

    I also give you permission to contact me by email and i can send you a link to an activity with such a problem so you can check it's fit file.

Comment
  • You can test it in apps.garmin.com/.../7c83d402-4b68-4f0a-b167-7139788a19b3 by setting a name and record a few seconds of activity (you'll need an ANT HR device, it can be a HRM strap or another watch that is broadcasting)

    You can change the name in the settings to either be a long English text, save the activity and you'll see that the whole length that you typed in was displayed on the DF screen AND was also saved to fit AND is displayed in the activity's stats in GCM

    OR do the same with Hebrew, and you'll see that the name you typed in is indeed displayed on the DF screen, but literally cut in half when you look in GCM.

    I don't know how to check whether the bug is that the Hebrew text is cut in half before it's saved to the fit file or it is saved correctly and the bug is in GCM when displaying.

    If you help me how to get a fit file from GC web and how to look into it then i can check.

    I also give you permission to contact me by email and i can send you a link to an activity with such a problem so you can check it's fit file.

Children
No Data