Esme Povirk (@madewokherd) commented about dlls/sane.ds/ui.c:
return FALSE;
}
+static void get_option(struct option_descriptor* opt, ScannerOption* option) +{
- CHAR title[OPTION_NAME_MAX];
- WideCharToMultiByte(CP_UTF8, 0, opt->title, -1, title, sizeof(title), NULL, NULL);
- lstrcpynA(option->name, title, OPTION_NAME_MAX);
As I understand it, title is meant to be a UI string (potentially localized) so I wouldn't rely on it to be consistent. I also worry about encoding and syntax issues. I suggest using the option name: https://sane-project.gitlab.io/standard/api.html#option-name
That will require updating the unixlib interface to include this in `struct option_descriptor` and copy it in `map_descr`.