You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm the creator of pydbus, DBus bindings for Python. I've stumbled upon the case of bytestrings - ay - which are commonly used to send non-Unicode data over DBus.
Because of the GDBus's API, apps commonly require these strings to be '\0'-terminated. And that's completely unintuitive for high-level languages, and something that requires the user to read API docs.
I'm thinking about solving the problem automatically, and I see two solutions:
Auto-append and auto-strip the last character of "ay"s; [EDIT: impossible, some APIs use not-terminated strings]
Decree (how?) that GDBus API is wrong, and strings sent over the wire should not be \0-terminated.
[EDIT:] Create a new DBus annotation meaning "All "ay"s in the arguments of this method/signal are \0-terminated bytestrings" - and auto-append/auto-strip \0 if it's present.
Whatever we choose, the solution should be agreed upon by authors of bindings for all languages. That's why I'm here.
Do you have any experience with "ay"-encoded bytestrings?
Relevant discussion: LEW21/pydbus#27 (please reply there, I've opened similar issues in 8 different projects to get attention of bindings authors)
The text was updated successfully, but these errors were encountered:
Hi,
I'm the creator of pydbus, DBus bindings for Python. I've stumbled upon the case of bytestrings - ay - which are commonly used to send non-Unicode data over DBus.
Because of the GDBus's API, apps commonly require these strings to be '\0'-terminated. And that's completely unintuitive for high-level languages, and something that requires the user to read API docs.
I'm thinking about solving the problem automatically, and I see two solutions:
Whatever we choose, the solution should be agreed upon by authors of bindings for all languages. That's why I'm here.
Do you have any experience with "ay"-encoded bytestrings?
Relevant discussion: LEW21/pydbus#27 (please reply there, I've opened similar issues in 8 different projects to get attention of bindings authors)
The text was updated successfully, but these errors were encountered: