Re: [libxml++] UTF8 support



Murray Cumming wrote:

Yes, we should consider it. So far I can think of these 2 disadvantages:
- All implementation is via templates in headers - so we can't fix it
just by installing a new version - applications must be recompiled.
- The API would be less clear (But, it works for std::string)

I don't think that the actual API is less clear. In fact, it is
identical, just that the *code* looks less clear, at least to people
who are not used to deal with these techniques. It's the same with
the std::string class: when you use it you are (probably) not even
aware of it being parametrized for specific character types.

Yes, the code would have to be entirely in headers. That's what I
alluded to in an earlier mail, and which is why I wanted to discuss the
issue in general before providing a patch: if the discussion would
make it clear that the patch wouldn't have any chance of being accepted
anyways, there wouldn't be any point in going through all the work of
writing one.

As I said, my xml C++ wrapper library does use the suggested approach,
and I indeed only have header files. And since we are really just talking
about a libxml2 wrapper, there isn't much code involved. All there is
is basically a mapping from C++ methods to C functions (ok, some minimal
housekeeping).

It works very well.

Regards,
		Stefan








[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]