I expect I'll present what findings I have at some point (spoiler: the outlook's bleak. Mostly due to licencing.)
Okay, that's probably enough suspense.
The thing is, I can't do this because of setup-mymod.exe. WeiDU is licenced under modified GPL terms that permit you to distribute unaltered binaries without any further conditions. There appears to be two possible conversion libraries available (libiconv and Camomile) and they are both licenced under regular LGPL terms, which do not permit the distribution of binaries without additional conditions. I can't very well say "From now on, additional terms and conditions apply to the distribution of WeiDU that did not apply before. I abide by them. Whether you do the same is your business *wink wink, nudge nudge*". Hence, I can't include conversion abilities in WeiDU due to setup-mymod.exe.
However, at the risk of giving things away, perhaps I should mention that I am working on something that will hopefully make setup-mymod.exe obsolete. Once you've gathered around to sing
Ding-Dong! The shell menus are dead I'll be able to revisit this problem and most likely implement a nice solution. Until then, I guess I'll try to make the HANDLE_* function user-friendly.
1. Setup-oldmod.exe is executed, user selected "Polish" translation,
2. WeiDU detects XX:EE and also read folder with translated files are. Path contain "polish".
3. WeiDU reads "Conversion map:"
It is possible, but there are a few problems.
1. The name of the language directory is completely arbitrary. It will probably work for most cases, but when it doesn't, it'll get it wrong.
2. There are no guarantees about the encodings (the actual encoding may be different from what we think it is) or the sane-ness of the implementation (e.g., some implementations mix different encodings in the same file.) and WeiDU, by itself, can't know if this is a TRA file that contains strings that should be added to the game, or if it is a TRA file that contains strings that are displayed during the installation. The latter should be converted, the former should not be and if the two kinds of strings exist in the same file, all bets are off.
3. I hate automatic systems that can't be reasonably relied upon to get things right. (In this particular case, the possible treats include unexplained crashes and other problems because no one vetted the compatibility and patch after patch after patch to try to get the automatic-ness right.)