by Mofi » Wed Jan 26, 2005 5:55 am
Different approach to the problem - print without converting OEM to ANSI.
At our company we still have to edit and print files in OEM format. So I created an UltraEdit ini-file specially for this files. All characters with a different hex code in OEM are displayed and printed correct (German umlauts ä, ö, ü, ... for example) although they are still saved in OEM format. No conversation is done manually.
You could to the same. Create an ini-file for your OEM files and use this ini-file and the /p option on command line to print the OEM file without conversation but with correct character signs.
The differences in the ini-file for the special OEM working version are (first line is ANSI setting, second the OEM setting):
[Settings]
ConvertKBDInput=0
ConvertKBDInput=1
Force OEM=0
Force OEM=1
[Font]
CharSet=0
CharSet=255
[FixedFont]
CharSet=0
CharSet=255
[PrintFont]
CharSet=0
CharSet=255
I also increased the size of the fonts in the OEM version, because our old OEM files do not contain more than 77 characters per line and I also changed the background color in the OEM version to a different color, so we can easily see, if the actual instance is for ANSI or OEM.
You also have to enable multiple instances in both ini-files (standard ANSI and special OEM) or you risk a settings mismatch if you open UltraEdit standard while the OEM version is currently running and vice versa.
Now you can use the command
uedit32 "your file" /I="path to ueditoem.ini\ueditoem.ini" /P
To all other interested users:
It is even possible to assign the special OEM ini-file to file extensions, so when you double click on a file in old OEM code, automatically UltraEdit with the OEM-ini-file is loaded.
Example registry entries for this:
[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\.oem]
@="UltraEdit-32 OEM"
[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\UltraEdit-32 OEM]
[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\UltraEdit-32 OEM\shell]
[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\UltraEdit-32 OEM\shell\open]
[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\UltraEdit-32 OEM\shell\open\command]
@="\"C:\\Program Files\\UltraEdit\\Uedit32.exe\" \"%1\" /I=\"C:\\Programs Files\\UltraEdit\\ueditoem.ini\""