From: Spoon <sp...@re...> - 2004-08-29 09:30:45
|
Hello, Can anyone help me with some step by step instructions on how to get the wide-char stuff to work? (wstring, wcout, wostream etc.) I have no idea how to use the tools mentioned in some earlier posts, conf. and such, so please make it easy to follow ;) Thank you Torben Poder |
From: John G. <jo...@jo...> - 2004-09-02 23:28:41
|
Spoon wrote: > Can anyone help me with some step by step instructions on how to get > the wide-char stuff to work? (wstring, wcout, wostream etc.) I think wchar classes are only partially implemented. At least this was the case last time I checked. I think I could output to wcout but not with a wstring. I think I had to specify a hard-coded wide C-string. I have been wondering about this myself, unfortunately nobody seems to have an answer yet. -- John Gaughan http://www.johngaughan.net/ jo...@jo... |
From: Spoon <sp...@re...> - 2004-09-10 22:41:01
|
John Gaughan wrote: > I think wchar classes are only partially implemented. At least this > was the case last time I checked. I think I could output to wcout but > not with a wstring. I think I had to specify a hard-coded wide > C-string. I have been wondering about this myself, unfortunately > nobody seems to have an answer yet. Well, it's all in there, if I search the include folders. I'm not sure it would actually compile, just saying that the declarations are in place. I would truly appreciate if anyone could clarify whether this works or not. In fact, it would make a nice addition to the FAQ, imho. I managed to get a little further by defining _GLIBCPP_USE_WCHAR_T, (I gleamed this from the iostream header). Had to correct a couple of files by changing #if to #ifdef, but after that I got no more errors regarding undeclared wcout, wstring etc. Unfortunately, I am now stuck with an error saying; "c:\....\cwctype:86: 'iswblank' not declared. *sigh* I'm too much of a newbie to dive deeper into that one. Are we really the only two people around who needs wstring and wstreams?? Torben Poder |
From: Aaron W. L. <aar...@aa...> - 2004-09-10 23:38:39
|
Spoon wrote: > John Gaughan wrote: > >>I think wchar classes are only partially implemented. At least this >>was the case last time I checked. I think I could output to wcout but >>not with a wstring. I think I had to specify a hard-coded wide >>C-string. I have been wondering about this myself, unfortunately >>nobody seems to have an answer yet. > > Are we really the only two people around who needs wstring and wstreams?? Theres a few small relatively silly issues that keep these things from superficially working. I think its a bug that libstdc++-v3 is so strict in its requirements for enabling wide character support. Its not difficult to get working, if you try at it for a while. I plan to come back to this soon (I meant to earlier, but I've been delayed). It is my hope that by the time GCC 4.0 (formerly named 3.5) is released, this will work with MinGW. Aaron W. LaFramboise |
From: John G. <jo...@jo...> - 2004-09-11 00:03:31
|
Spoon wrote: > Had to correct a couple of files by changing #if to #ifdef, but after > that I got no more errors regarding undeclared wcout, wstring etc. Try defining _GLIBCPP_USE_WCHAR_T to 1 instead of just defining it. That simplifies the #if directives to "#if 1" which means "always do this." > Unfortunately, I am now stuck with an error saying; > "c:\....\cwctype:86: 'iswblank' not declared. *sigh* I'm too much of > a newbie to dive deeper into that one. After a cursory look I could not find what causes this. Grepping all the source code showed that only that file uses it, which probably is the problem. > Are we really the only two people around who needs wstring and > wstreams?? Saying that we /need/ Unicode is probably an overstatement. Considering that Windows (NT) uses Unicode internally it does not matter much unless you really do need the extended character set. Change happens slowly... -- John Gaughan http://www.johngaughan.net/ jo...@jo... |
From: Spoon <sp...@re...> - 2004-09-11 05:56:07
|
John Gaughan wrote: > Try defining _GLIBCPP_USE_WCHAR_T to 1 instead of just defining it. > That simplifies the #if directives to "#if 1" which means "always do > this." Oooh, right..... *sheepish look* > Saying that we /need/ Unicode is probably an overstatement. > Considering that Windows (NT) uses Unicode internally it does not > matter much unless you really do need the extended character set. True, it all does work with ASCII, but doesn't that mean every API call needs a conversion internally, (if it uses chars, that is..)? My understanding was that this causes a performance hit, since every fooA(char* bar) call would require a runtime conversion of "*bar" to unicode, and mapping to fooW(wchar_t* bar), am I wrong? Nonetheless, I kinda do need the extended set, since I live in a galaxy far, far away ;) Aaron W. LaFramboise wrote: "Its not difficult to get working, if you try at it for a while." Any possibility that you could give me a few hints as to how? :) Anyway, thanks for the replies. Torben Poder |
From: Aaron W. L. <aar...@aa...> - 2004-09-11 06:10:00
|
Spoon wrote: > Any possibility that you could give me a few hints as to how? :) Sorry, you'll have to wait a while until I get a chance to come back to this. However, there has been some discussion of this in the past on this mailing list. Try searching it, and try googling for discussion elsewhere. You'll probably need to rebuild libstdc++-v3 at least, and build libiconv. The downside is that what libstdc++-v3 presently [almost] supports isn't quite right for Windows. Linux and similar systems aim at UTF8 as the native representation. Since libstdc++-v3 is primary aimed at these systems, it handles wide characters in many cases by converting them to narrow characters, which shouldn't necessarily happen. I've thought about fixing this for a long time, but I won't have time to do this soon. Aaron W. LaFramboise |
From: Spoon <sp...@re...> - 2004-09-11 06:24:40
|
I'll wait and see what happens. (Rebuilding system files is a little out of my league yet) Thanks for shedding some light on it ;) Torben Poder |
From: Danny S. <dan...@cl...> - 2004-09-11 07:10:37
|
From: "Spoon" | I'll wait and see what happens. (Rebuilding system files is a little out | of my league yet) | | Thanks for shedding some light on it ;) | You could also try the STLPort iostream lib and STL, http://www.stlport.org/index.html It does have wide streams and strings and even some native Windows locale support I haven't tried in awhile, but it used to build relatively painlessly on mingw. Danny | Torben Poder | | | ------------------------------------------------------- | This SF.Net email is sponsored by: YOU BE THE JUDGE. Be one of 170 | Project Admins to receive an Apple iPod Mini FREE for your judgement on | who ports your project to Linux PPC the best. Sponsored by IBM. | Deadline: Sept. 13. Go here: http://sf.net/ppc_contest.php | _______________________________________________ | MinGW-users mailing list | Min...@li... | | You may change your MinGW Account Options or unsubscribe at: | https://lists.sourceforge.net/lists/listinfo/mingw-users |