|
 |
Darren New wrote:
> If you have several different parser libraries, for example (say, XML,
> HTTP headers, message catalogs) and they all depend on different
> implementations of unicode strings, what's a good way of making it so
> you don't have to convert between unicode string representations each
> time you move data from the message catalog to an XML record sent over
> HTTP?
I don't know of any books that suggest solutions, but you might consider
writing your own set of bridge classes to go between the different
libraries.
That is, say you'd have a class DN_Unicode_String (or whatever you end
up calling it), you would define casting operations both from and to
every other unicode string type used.
Then, in your code, the only type you use would be the
DN_Unicode_String, and it would work automatically with all the other
libraries.
It's an ugly solution, and in the end it just increases the number of
types being used, but it would work.
...Chambers
Post a reply to this message
|
 |