[Oledb-dev] Error message encoding
Shachar Shemesh
psql at shemesh.biz
Thu Apr 20 07:49:53 UTC 2006
Victor Snezhko wrote:
>- CErrorLookupService::ReportCustomError(err.str(), hr, IID_ICommand );
>+ CErrorLookupService::ReportCustomError(U82CW(err.str()), hr, IID_ICommand );
>
>
Hi Victor,
The way I see it, ReportCustomError will be either used with errors
returned from Postgres, or with locally generated errors. I believe that
Postgres returns errors in UTF-8 because that's the client encoding set
for it, so that is not likely to be something relating only to your
specific setup.
I think that it is better to assume all non wide Unicode strings passed
to ReportCustomError are UTF-8, and save the tedious and error prone
task of surrounding each and every call to it with U82CW.
I committed into CVS a variation of your patch. I modified
ReportCustomError to assume any "char *" string passed to it is in
UTF-8. Please let me know if that solves your problem.
Shachar
More information about the Oledb-devel
mailing list