Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Handle No-chars in text fields when reading and writing. #15

Open
Krolken opened this issue Mar 3, 2022 · 0 comments
Open

Handle No-chars in text fields when reading and writing. #15

Krolken opened this issue Mar 3, 2022 · 0 comments

Comments

@Krolken
Copy link
Contributor

Krolken commented Mar 3, 2022

A text data field that is not completely filled uses null-data \x00 to fill out the rest of the bytes.

When reading the data we would like to remove these as it makes it annoying to serialize. And when writing data back we would like to fill the not used space with null-data.

So unit m3 would be filled as `'m3\x00\x00\x00\x00\x00\x00' for example.

But there are some edge cases where there is data after null-data. See #1. Example would be
'Ext.power modem B6\x00o%} '
'Call window B2\x00 B2\x002\x00\x95\x02'
'Status St1\x00Closed\x00 '
'Flow Q\x00 B3} 3}!A} } } '
"Cover B1\x00\x00\x00\x00\x00\x04B\x00;\x00\x00'\x00J\x00"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant