Thanks for the suggestions Tom.
As I'm developing a general-purpose driver I can't do anything in PostgreSQL config, but it's a good workaround suggestion for users who encounter this error.
Sending lc_messages in the startup packet could work, but if I understand correctly that setting combines both encoding and language. I guess I can look at the user's locale preference on the client machine, try to translate that into a PostgreSQL language/encoding and send that in lc_messages - that seems like it might work.
Shay