On Thu, 19 Sep 2002 03:33:16 -0400 Glenn Maynard <[EMAIL PROTECTED]> wrote:
> On Thu, Sep 19, 2002 at 03:03:30AM -0400, Michael B. Allen wrote: > > Is libiconv capable of doing wchar_t, UCS-4, and UTF-8 operations on > > Windows? I couldn't even build it (although I didn't try very hard). > > It should be able to do any conversion it can in *nix ... > > Giving "wchar_t" to iconv isn't portable, though, is it? Not if your importing/exporting. But you might very well use it internally and if someone want'd to run that app on Windows too that's the kind of thing I would think libiconv should be good for so I was surprised I couldn't build it with full support. > > (It's a bit of a hack, too, but a bearable one.) Are you talking about Bruno's implementation? I have wondered if wchar_t could just be treated like any other encoding. It may not have a rigid definition but it wasn't clear to my why those wchar_t clauses in the main convertion loops really had to be there. Actually what would be even better is if the encodings could be abstracted further such that they may be specified for inclusion individually or categorically using a #define. As it is, compiling something against it results in a very large binary because of all the tables. The source doesn't look that far off from that point either. It's well organized at least. Mmm, even *better* would be to use Markus' Unicode toolchest to make character set files ideal for loading on demand. If you don't have them you just get an error. > > Hmm. Another thing, while we're on iconv: How do you get the number of > non-reversible conversions when -1/E2BIG is returned? It seems that > converting blocks into a small output buffer (eg. taking advantage of > E2BIG) means that count is lost. Yikes! You just left my sphere of knowledge :-) > > -- > Glenn Maynard > -- > Linux-UTF8: i18n of Linux on all levels > Archive: http://mail.nl.linux.org/linux-utf8/ > > -- A program should be written to model the concepts of the task it performs rather than the physical world or a process because this maximizes the potential for it to be applied to tasks that are conceptually similar and more importantly to tasks that have not yet been conceived. -- Linux-UTF8: i18n of Linux on all levels Archive: http://mail.nl.linux.org/linux-utf8/
