[botan-devel] Error Compiling Botan with VS2008 and unicode character project setting

Joel Low joel at joelsplace.sg
Tue Dec 13 16:34:37 EST 2011

I may not be representative of the Windows developer community as a whole; however my inclination is that if I have a char* or std::string, I assume it is ANSI. The only time I deal with Unicode would be when I'm using wchar_t*. This is very different from, say, GTK+, since Windows functions taking a char* are purely ANSI only; the only way to use Unicode would be to convert to UTF-16 and call the W functions.

As a general rule, I also do not target Win9x specifically, since it is rather difficult to set up a test machine, and the MSDN documentation is only including Win2k as the base reference version (see the Minimum Operating System value for every API function, the lowest current value is Windows 2000)


> -----Original Message-----
> From: botan-devel-bounces at randombit.net [mailto:botan-devel-
> bounces at randombit.net] On Behalf Of Jack Lloyd
> Sent: Tuesday, 13 December, 2011 10:04 PM
> To: Botan development list
> Subject: Re: [botan-devel] Error Compiling Botan with VS2008 and
> unicode character project setting
> On Tue, Dec 13, 2011 at 08:58:02AM +0800, Joel Low wrote:
> > I'm not too sure, but my inclination when dealing with such code is
> to
> > convert the ANSI to Unicode and call the W version regardless, unless
> > you're intending to target Win9x (which IIRC VS2008 does not support
> > anyway -- what are the compilers supported by Botan, Jack?)
> In theory VS 2003 and on are supported, though I only test regularly
> with 2008/2010. I doubt I would do much to support Win9x though, I
> think requiring at least 2000 is pretty reasonable at this point.
> From the perspective of a Windows programmer would it make sense for a
> function taking a std::string used as a filesystem name to assume it is
> in UTF-8, convert to wide characters with MultiByteToWideChar and call
> the W version?
> -Jack
> _______________________________________________
> botan-devel mailing list
> botan-devel at randombit.net
> http://lists.randombit.net/mailman/listinfo/botan-devel

More information about the botan-devel mailing list