Microsoft and Sybase define this function differently.
FAIL
if appropriate. asprintf()
to avoid buffer overflow. separate error messages for no-such-server and no-such-user.
Use more robust error message generation.
For reads, cope with encodings that don't have the equivalent of an ASCII '?'.
Support alternative to '?' for the replacement character.