[UPDATE/EDIT FOUND A BATCH/POWERSHELL SOLUTION FOR ITEM IN PARAGRAPH "2)" BELOW!]Thank you for the support. I have run into a couple of snags, one is fixable, just have to code for it, and the other is just annoying, but I am trying to find a coding solution.
1) Trying to automate things as much as possible, and remembering UQMG Classic is quirky with handling of fields, I had to use some creative coding to handle mods and BAT text fields which include (1) stuff like special characters and periods in the names of java classes, and (2) stuff like commas in the text description of properties. Whereas VB is really good in handling fielded lists, like CSV files, sometimes (yeah, sometimes) it chokes when it encounter things like "2xFAB250, 2xFAB50",2x250+2x50 . In this case it really dislikes that comma inside the quotes, and the good thing (bad thing) is that it can be inconsistent when it likes it or not. I have problem "1" dealt with with very painful coding. Item 2, I use a special pattern, namely "@^@" to indicate a comma, then I replace it in the UQMG classic fields... Well... dumb old me forgot to do the same for writing and identifying patterns, so I'll have to find that routine in UQMG Classic. Just an old man forgetting things dumb mistake. Will take a bit of time, but totally doable. [Edit, this is the problem related to the Empty load in the He-100 that I mentioned above, so that is good... that will solve issues.]
2) The second problem is something that has persisted through the life of VB6. Remembering again that UQMG Classic is ancient code, I am having to deal with its quirky way to handle UNICODE characters. It may affect users as it has in the past because they don't have a particular DLL in their Windows installation, and that is a non-distributable file (as in, it is not something that comes in an installation, but more associated with what kinds of MS Office items you have installed). The file is "c:\Windows\SysWow64\FM20.dll" That is not the only thing.
To make a long story short... to display characters correctly, like "Bücker Bü-XXX" instead of "Bucker Bu-XXX" you have to have a combination of controls (like grids and list boxes) that can handle Unicode characters, you have to have the correct character set, the correct Font (like Tahoma, which can handle UNICODE), the controls that use FM20.dll... and doing it in VB6 is like clapping with one hand, like punching a whole in the wall with your face.
Well, I found a solution in the old hidden corners of the Web in which an Arab coder was dealing with a similar problem having a heck of a time trying to convert VB6 code to handle his company's customer entry form with Arabic characters... after several discussions that lead to nothing, like most of the ones in this subject (by that I mean a lot of experts that can explain the theory behind it, but no ability to generate code to fix it...) the coder found an easy solution , which was to change the Character set in the input text file... yeah, opening the file in NOTEPAD, and in the Save As dialog, changing the Encoding Field, which will display the default for most files (UTF-8), but can be changed to other values.
Out of sheer hope, I changed my input file to ASCII, and it fixed things... suddenly everything turned nice in UQMG classic.
Soo... great... how do I do it programmatically so that I don't have to do it manually like that? That has been the problem. I tried changing the encoding in the original files generated by UCT (UQMG Conversion Tool), which are most likely in UTF-8, and converting them to ASCII encoding, but things got botched up... and "Bücker Bü-XXX" became "B?cker B?-XXX".
I think I have one more thing to try before asking for help from the coders here. My routines in UQMG use the very convenient Text / Text-field capabilities inherent in VB (for fast DB application building), but those can be odd if the input files are not exactly like what the program wants to find. I may try using the Binary input and output and see if that fixes things when it comes to decoding and encoding.
WHY DO YOU CARE? Probably not, but if you are a Coder, and you can lend me a hand I would appreciate it:
* I am looking for a VB, or otherwise routine, DLL, application (that can take command/execution input variables) that can essentially do what Notepad does, that is (1) Read content of a file (2) Rewrite file in the character encoding I specify. Essentially opening a file in Notepad, Saving it as blablabla.whatever using the Encoding I specify.
I am looking further into this:
https://stackoverflow.com/questions/16598785/save-text-file-in-utf-8-encoding-using-cmd-exe#:~:text=The%20default%20encoding%20for%20command,and%20then%20run%20your%20command.&text=Change%20it%20back%20to%20default%20when%20done.Maybe a CMD or PowerShell script will do it... but I wish I could do it programatically without failing.
EDIT: PowerShell may have a slightly more elegant solution:
https://www.powershelladmin.com/wiki/Convert_from_most_encodings_to_utf8_with_powershellAnyway, I am working at it, slowly, but surely. Still, if anyone has a coding solution that would be awesome.
and, update in 2 weeks
EDIT / SOLUTION TO ITEM "2)" ABOVE REGARDING CHANGING INPUT FILE FROM UTF-8 TO ASCII:* Looking at that last hyperlink and through trial and error, I was able to create a batch/PowerShell solution. I wish I could program it, but I have a solution that I can somewhat automate, and that is good enough!
This is what the code looks like in a batch file called "encode.bat"
@echo off
rem *******************************************************************************
rem **** SCRIPT TO CHANGE UCT2020 TEXT INITIALIZATION FILES FROM UTF-8 TO ANSI ****
rem **** Based on info from: www.powershelladmin.com/wiki/Convert_from_most_encodings_to_utf8_with_powershell
rem **** Work in Progress v.1.1, by UberDemon, 12 June 2020 ****
rem *******************************************************************************
cls
pause
ren fd_Aircraft.ini UTF8_fd_Aircraft.ini
ren fd_ComboAircraft.ini UTF8_fd_ComboAircraft.ini
ren fd_countryblue.ini UTF8_fd_countryblue.ini
ren fd_countryred.ini UTF8_fd_countryred.ini
ren fd_craftjump.ini UTF8_fd_craftjump.ini
ren fd_craftjumpval.ini UTF8_fd_craftjumpval.ini
ren fd_DogfightNames.ini UTF8_fd_DogfightNames.ini
ren fd_DogfightNamesFly.ini UTF8_fd_DogfightNamesFly.ini
ren fd_Regiments.ini UTF8_fd_Regiments.ini
ren fd_Skins.ini UTF8_fd_Skins.ini
ren fd_SpecialWeapons.ini UTF8_fd_SpecialWeapons.ini
ren fd_Weapons.ini UTF8_fd_Weapons.ini
ren LoadLastData.ini UTF8_LoadLastData.ini
ren SystemMainDefaults.ini UTF8_SystemMainDefaults.ini
pause
PowerShell.exe "Get-Content .\UTF8_fd_Aircraft.ini -Encoding UTF8 | Set-Content -Encoding String .\fd_Aircraft.ini"
PowerShell.exe "Get-Content .\UTF8_fd_ComboAircraft.ini -Encoding UTF8 | Set-Content -Encoding String .\fd_ComboAircraft.ini"
PowerShell.exe "Get-Content .\UTF8_fd_countryblue.ini -Encoding UTF8 | Set-Content -Encoding String .\fd_countryblue.ini"
PowerShell.exe "Get-Content .\UTF8_fd_countryred.ini -Encoding UTF8 | Set-Content -Encoding String .\fd_countryred.ini"
PowerShell.exe "Get-Content .\UTF8_fd_craftjump.ini -Encoding UTF8 | Set-Content -Encoding String .\fd_craftjump.ini"
PowerShell.exe "Get-Content .\UTF8_fd_craftjumpval.ini -Encoding UTF8 | Set-Content -Encoding String .\fd_craftjumpval.ini"
PowerShell.exe "Get-Content .\UTF8_fd_DogfightNames.ini -Encoding UTF8 | Set-Content -Encoding String .\fd_DogfightNames.ini"
PowerShell.exe "Get-Content .\UTF8_fd_DogfightNamesFly.ini -Encoding UTF8 | Set-Content -Encoding String .\fd_DogfightNamesFly.ini"
PowerShell.exe "Get-Content .\UTF8_fd_Regiments.ini -Encoding UTF8 | Set-Content -Encoding String .\fd_Regiments.ini"
PowerShell.exe "Get-Content .\UTF8_fd_Skins.ini -Encoding UTF8 | Set-Content -Encoding String .\fd_Skins.ini"
PowerShell.exe "Get-Content .\UTF8_fd_SpecialWeapons.ini -Encoding UTF8 | Set-Content -Encoding String .\fd_SpecialWeapons.ini"
PowerShell.exe "Get-Content .\UTF8_fd_Weapons.ini -Encoding UTF8 | Set-Content -Encoding String .\fd_Weapons.ini"
PowerShell.exe "Get-Content .\UTF8_LoadLastData.ini -Encoding UTF8 | Set-Content -Encoding String .\LoadLastData.ini"
PowerShell.exe "Get-Content .\UTF8_SystemMainDefaults.ini -Encoding UTF8 | Set-Content -Encoding String .\SystemMainDefaults.ini"
Once the conversion is done, opening the file in Notepad displays both the correct characters, it also show in bottom right lower corner the Encoding to be ANSI. This was trial and error. The source is definitely UTF-8, which is the output from UCT2020, but trying to encode it to ASCII yields wrong results... String was an option for encoding and it worked, and got loaded correctly in UQMG Classic.