[sane-devel] Character encoding used for sane_strstatus() strings

John Scott jscott at posteo.net
Mon Jul 18 03:25:51 BST 2022


Hi,

The SANE spec says that all strings are encoded in ISO-8859-1 ("Latin-
1"). However, from inspecting the code for sane_strstatus(), it appears
that it just returns ordinary string literals, which use whatever
encoding the compiler prescribes for narrow string literals and need not
be the same.

So, what character encoding should I be assuming for strings coming from
sane_strstatus() as an application writer? One solution to this dilemma
is, since sane_strstatus() appears to only use characters from ASCII in
the strings, is to use UTF-8 string literals, like this:
	u8"Hello, world"

If you can affirm that the specification needs to prevail, I can send a
merge request to adjust the string literals accordingly.

Thanks,
John
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 252 bytes
Desc: This is a digitally signed message part
URL: <http://alioth-lists.debian.net/pipermail/sane-devel/attachments/20220718/ae76c8da/attachment.sig>


More information about the sane-devel mailing list