3 Jun 2004 23:23
Re: wide character support
----- Original Message -----
From: "Andreas Beyer"
| I don't see why there is no default support of wstring in mingw's
| libstdc++. It only has to be ensured that msvcp60 gets linked before
| libstdc++ and then everything works fine (at least with gcc 3.4.0). I
| suggest that future bin-packages of libstdc++ are compiled with wstring
| support and to change mingw32-g++ settings, such that it links msvcp60
| before libstdc++. This should provide at least basic support for
| wstring. I haven't tested all possible situations, but the attached
| example uses a few basic features that work fine.
I don't think libstdc++ should depend on msvcp60.
To get wstring support to work simply do this to cwchar
(or to c/std_cwchar.h if working with sources)
*** cwchar.orig Thu Jun 03 22:06:11 2004
--- cwchar Thu Jun 03 22:04:24 2004
*************** namespace std
*** 137,143 ****
#undef wprintf
#undef wscanf
! #if _GLIBCXX_USE_WCHAR_T
namespace std
{
using ::wint_t;
--- 137,143 ----
#undef wprintf
#undef wscanf
! #if _GLIBCXX_USE_WCHAR_T || _GLIBCXX_USE_WSTRING
namespace std
{
using ::wint_t;
That was accidentally left out when I applied the 3.3.3 mingw patchset to 3.4.0. It will
be fixed next time, The rest of the wstring support is already there.
wide streams will not work. For that you do need the msvcp60 functions or replacements
for them. The replacements are fairly straigthforward to write using MultiBytetoWideChar
api, but even with the msvcp60 functions there are still problems with locale support.
The quickest way to get locale fixed would be to write a nl_langinfo-like interface to the
w32api WC-to-MB functions.
Danny
|
| Andreas
|
|
-------------------------------------------------------
This SF.Net email is sponsored by the new InstallShield X.
From Windows to Linux, servers to mobile, InstallShield X is the one
installation-authoring solution that does it all. Learn more and
evaluate today! http://www.installshield.com/Dev2Dev/0504
_______________________________________________
MinGW-users mailing list
MinGW-users@...
You may change your MinGW Account Options or unsubscribe at:
https://lists.sourceforge.net/lists/listinfo/mingw-users
RSS Feed