GDK icon indicating copy to clipboard operation
GDK copied to clipboard

Request to Define Encoding for Multibyte Strings in GameInput API

Open radian-jp opened this issue 1 month ago • 1 comments

I’ve been working with the GameInputDeviceInfo structure and noticed that in version 3, the displayName field has been changed to const char*, whereas earlier versions (e.g., v0) used GameInputString, which explicitly defined UTF-8 encoding.

GameInputDeviceInfo (v0)

GameInputDeviceInfo

Currently, the documentation for v3 does not specify the character encoding of displayName, nor does it clarify the encoding for other members that may contain multibyte characters. This ambiguity makes it difficult to reliably handle string data, especially for UI display and localization.

In my testing, the data appears to be UTF-8 encoded, but without official documentation, it's risky to assume consistent behavior across devices and platforms.

I would like to request that the character encoding be clearly defined and documented for all API members that may contain multibyte strings, not just displayName. Standardizing on UTF-8 would be ideal, as it simplifies handling and ensures compatibility across languages and systems.

radian-jp avatar Nov 20 '25 14:11 radian-jp

Hi @radian-jp ,

We follow the GDK style of UTF-8 encoded char* strings everywhere in GameInput, the display name included. This is just gap in documentation which we will work to address.

AlexYatskov avatar Nov 20 '25 23:11 AlexYatskov