Hi Skywalk
The project is (probably) quite unusual...
A brief synopsis...
I have a bunch of programs that manipulate streams of (ASCII) data.
The actual nitty-gritty manipulation is done by a collection of (16?) proprietary DLL's.
I only have the interfaces to the customer DLL's and they all use ASCII (and as far as I can tell will always do so).
Much of the detailed processing is controlled by command strings (ASCII) passed via the DLL interfaces.
The problem with these interfaces is that when they get any string parameter, they save the address (possibly for much later use), not a string copy. (Written in C I suspect)
So this works well for strings that are held static in each program string space but collapses spectacularly when an inline conversion from Unicode to ASCII is done because the converted string is temporary. Did that make sense?
The net result of all this is that I cannot make the damned thing work with a non-ASCII compiler without more messing about than is sensible.
As an added complication, there's a (roughly) monthly update of 'signature' strings that have to be built into the software when they arrive (yes, ASCII again, about 5-6000 lines).
I have tried what you suggest and the memory management pain is indeed great. I've even trialled predeclaring all the interface strings using data.a and passing the static addresses to the DLL's (for one very small section). This does actually work but makes the whole thing very hard work and error-prone. Without the command strings inline, it loses all clarity and I'd never get anything through a review again.
I've been investigating all this for about the last year and on balance, I've come to the conclusion it's better to remake it all and keep it sensible rather than trying to hack round the lack of ASCII support. My current plan is to continue to maintain using 5.45 for the next year (approx) while I change languages (and gui) in the background.
Sorry, this is a lot longer post than I intended but I guess it's therapeutic. Thanks for your interest.
If you have any ideas / magic wand, please let me know.