Tapatalk

Manual customization of command OEM Character Set

Manual customization of command OEM Character Set

5
NewbieNewbie
5

    Nov 05, 2008#1

    I have just upgraded to UltraEdit v14.20, but I found the preferred command OEM Character Set is gone.
    Does anyone know how to enable it in this new version?
    It can be found in prevision version in menu View with menu item name OEM Character Set.

    Thanks,
    -L.K.

    1
    NewbieNewbie
    1

      Nov 06, 2008#2

      The feature is definitely in the application executable. It is still in the list of commands available for toolbar customization, but not in list of commands for menu customization. The last version with this command in menu customization dialog was 14.00b+1. The command is not anymore in commands list of menu customization dialog after update to 14.10.0.1024.

      The command is listed as Show font with OEM Character Set in the toolbar customization dialog.

      The command can be get back into a menu by manually adding it to the Environments (later named Layouts) menu profiles files. The files to edit have a .mb1 file extension. The file uedit32.mb0 must be also modified. They are located in general in directory %APPDATA%\IDMComp\UltraEdit. The line for adding the menu item is:

      Code: Select all

       M "OEM C&haracter Set",      ID_FONT_OEM
      PS: If the current (selected) environment/layout is manually edited and next UltraEdit is exited and started again, it restores the previous configuration without the changes done manually on environment menu profile file. For that reason it is necessary to select another environment/layout before editing it and then switch back to initial environment/layout or copy the modified *.mb1 file of currently used environment/layout as uedit32.mb0 after manual edit and exit of UltraEdit before starting UltraEdit again.

      6,685587
      Grand MasterGrand Master
      6,685587

        Nov 06, 2008#3

        Just a hint: It is possible that UltraEdit remembers if an OEM font should be used for a file with a specified extension. So you would not need to select always manually the OEM character view (and edit) for every file opened having one of the specified file extensions like .bat, .cmd or .nfo files. See my last post at Different font depending on file extension for details about file extension based configuration.

        It is advisable to add the command OEM Character Set to a customized toolbar when working for some files with OEM character set active by default. This gives you the possibility to easily see for an active file the state of the OEM Character Set setting. In the toolbar customization dialog the command is listed with Show font with OEM Character Set.

        5
        NewbieNewbie
        5

          Dec 14, 2008#4

          Thank all so much!
          I am using Alejandro's way and it works fine. Great! :D

          22
          Basic UserBasic User
          22

            Jul 04, 2011#5

            Not to dredge up an old topic, but I can't find the command OEM Character Set in the View menu anymore since updating to v17.10.

            I tried several different fonts, but the command is still missing. According to the help files, it should be there.

            6,685587
            Grand MasterGrand Master
            6,685587

              Jul 04, 2011#6

              The command OEM Character Set was removed by IDM in UltraEdit for Windows v14.10 and UEStudio v6.60. If you need that command because you often have to edit files using OEM character set, you can add it manually to a customized menu or a customized toolbar as explained above.

              I will report IDM by email that page with title OEM Character Set (View menu) still exists in help of UltraEdit referenced from keywords index although the command was removed long time ago and is not referenced anymore from contents index or any other help page.

              22
              Basic UserBasic User
              22

                Jul 14, 2016#7

                Can Show font with OEM Character Set be added to the currently latest UE v23.xx? The *.mb1 files are no longer used, apparently. Thanks.

                3
                NewbieNewbie
                3

                  Jul 28, 2016#8

                  I am also trying to get this working again in v23.xx with no luck until now.

                  @mofi:
                  Are you using v23.xx of UltraEdit?
                  If yes, can you explain how you got this working?
                  I can live with any kind of solution: menu, toolbar, ...

                  How do you open .bat, .cmd files in OEM mode as default?

                  (Schöne Grüße aus Salzburg nach Wien)

                  6,685587
                  Grand MasterGrand Master
                  6,685587

                    Jul 30, 2016#9

                    Update: The command Show font with OEM character set is back in ribbon and in toolbar customization dialog since UltraEdit for Windows v26.20.0.01 and UEStudio v19.10.0.46. So the steps below are needed only for adding this command to a toolbar in UltraEdit for Windows v23.00.0.42 to v26.10.0.72 and UEStudio v16.00.0.11 to v19.10.0.14.

                    Here is a step by step description on how to add the command OEM Character Set to a customized toolbar in currently latest UltraEdit for Windows v23.20.0.28 used in toolbar/menu mode (not in ribbon mode). I used the 32-bit version on recording the steps, but there should be no difference to 64-bit version.

                    Create a custom layout

                    It is advisable to save the current standard layout as custom layout before making any changes to ribbon/menu/toolbar in UltraEdit for Windows v23.20 if that was not already done before.
                    • Ribbon Mode
                      Click on ribbon tab Layout. On left side there is an icon showing multiple windows with text Layout. Click on the down arrow to open the popup menu and click on menu item Manage Layouts.

                      Toolbar/Menu Mode with Contemporary menus
                      Click in menu Layout on submenu Layout to open it and click on menu item Manage Layouts.

                      Toolbar/Menu Mode with Traditional menus
                      Click in menu View on submenu Layouts to open it and click on menu item Manage Layouts.
                       
                    • Click on button Save current state as, enter as layout name for example MyLayout and as description My custom layout, click on button OK, next on button Select layout and last on button Continue.
                       
                    • Exit UltraEdit/UEStudio with key Alt+F4 and restart UE/UES if the user interface is now a mixture of toolbar/menu and ribbon mode. It looks like there is an issue in toolbar/menu mode with application window drawing after saving current layout as new layout and using it. There is no issue on saving current layout as new layout when using ribbon mode.
                    Adding OEM Character Set to contemporary or traditional toolbar
                    • Click with secondary (right) mouse button on the ribbon to open the context menu and click with primary (left) mouse button in submenu Toolbar/Menu Mode either on Contemporary menus or Traditional menus to switch to this GUI mode if not already done before.
                       
                    • Click with secondary (right) mouse button on the toolbar to open the context menu and click with primary (left) mouse button on Large buttons if this toolbar option is currently enabled.

                      It is necessary for the steps below to use the small buttons during the manual customization. The large buttons can be enabled again when finished with manual customization.
                       
                    • Click with secondary (right) mouse button on the toolbar to open the context menu and click with primary (left) mouse button on Customize to open the toolbar customization dialog.
                       
                    • On tab Toolbars click on button New, enter as name for the toolbar MyToolbar (can be later renamed) and click on button OK.
                       
                    • Move the new toolbar with name MyToolbar displayed in the middle of UltraEdit main window to top to the other toolbar(s).
                       
                    • On tab Commands select on left side All Commands and scroll down on right side to the end of the commands list.
                       
                    • In the commands list on right side there is the command Welcome Page. Click with primary (left) mouse button on this command, hold the mouse button, move mouse pointer over the toolbar MyToolbar and leave the mouse button, i.e. drag the command from the commands list on the custom toolbar and drop it there. Close the toolbar customization dialog with button Close.
                       
                    • Exit UltraEdit/UEStudio now after toolbar is prepared for the command OEM Character Set.
                       
                    • Open in Windows Explorer or any other file manager the directory %APPDATA%\IDMComp\UltraEdit respectively %APPDATA%\IDMComp\UEStudio or the directory containing the INI file and therefore also the workspace file.
                       
                    • Open in any other text editor than UltraEdit/UEStudio like Windows Notepad the workspace file uedit32.in0 (32-bit UE) or uedit64.in0 (64-bit UE) or uestudio.in0 (UES). Since UE for Windows v24.00 and UEStudio v17.00 the workspace file is Unicode instead of ANSI encoded and therefore the file names are uedit32u.in0 (32-bit UE) or uedit64u.in0 (64-bit UE) or uestudiou.in0 (UES).

                      Alternatively it is also possible to make a copy of the workspace file, open the copy in UE/UES, edit it as written below, and overwrite workspace file of UE/UES after save and exit of UE/UES with the modified copy.
                       
                    • Search in the workspace file for Name=MyToolbar. Below the line with this string there is a line with Buttons=. Replace the long string with the hexadecimal digits with the following string:

                      Code: Select all

                      00200000010000000100FFFF010012004342434750546F6F6C626172427574746F6E0B81000002000000B80000002053686F7720666F6E742077697468204F454D2043686172616374657220536574000000000000000000000000010000000100000000000000094D79546F6F6C6261721700000050
                    • Save the modified workspace file and exit the text editor.
                       
                    • Start UltraEdit/UEStudio and an icon with a blue A with a thick blue bar below should be displayed in the toolbar instead of the light bulb.

                      In UltraEdit for Windows < v23.00 respectively UEStudio < 16.00 the icon for OEM Character Set was a big white A on black background with a small gray o on white background in a box on bottom right corner of the icon. But this icon does not exist anymore in resources of UE/UES because all icons were redrawn for UE v23.00 and UES v16.00.
                       
                    • The command Show font with OEM Character Set can be moved to any other toolbar by opening once again from context menu of the toolbars the toolbar customization dialog and drag and drop the command to a different toolbar. Also the toolbar MyToolbar can be renamed if you don't like the name MyToolbar, or deleted if not further needed because the command was moved to another toolbar.
                       
                    • It is possible to use now again the large buttons which can be re-enabled via a click on toolbar context menu item Large buttons.
                       
                    • Exit UltraEdit/UEStudio after toolbar customization is finished.
                       
                    • Go back to the file manager (Windows Explorer) and copy the updated and used workspace file uedit32.in0 or uedit64.in0 or uedit32u.in0 or uedit64u.in0 or uestudio.in0 or uestudiou.in0 over the custom layout workspace file MyLayout.in1 to have a backup for the future.
                       
                    • In case of alternate text editor or UE/UES used before for editing the workspace file made a backup of the workspace file in the application data directory of UltraEdit/UEStudio, delete this backup file and then close the file manager.
                    The command OEM Character Set is now ready for usage in toolbar/menu mode.

                    How to customize UltraEdit/UEStudio for editing *.bat and *.cmd files by default with OEM Character Set enabled and all other single byte encoded text files opened in same instance or another instance of UltraEdit/UEStudio with ANSI (Windows) encoding is described in topic UE/UES configuration to edit batch files (*.bat, *.cmd) by default with OEM character set.
                    Best regards from an UC/UE/UES for Windows user from Austria

                    3
                    NewbieNewbie
                    3

                      Jul 31, 2016#10

                      Thank you @Mofi.

                      Your solution works like a charm!
                      I made the changes on a x64 installation of UltraEdit.

                      What a pity IDM removed this from the GUI, I hope they will not remove this function completely from UltraEdit in future versions.  :evil:

                        Jun 21, 2019#11

                        So it's 3 years later that I have commented on this...

                        It looks like IDM has now removed the OEM character set feature from UltraEdit completely.
                        I was trying to get this going on UltraEdit v26 with no luck. :(
                        The procedure above from Mofi works (the button with the blue A appears), but it does not work.
                        The option from the font menu "Use OEM fixed pitch font" has also gone...

                        Had anyone success configuring this on UltraEdit v26?

                        6,685587
                        Grand MasterGrand Master
                        6,685587

                          Jun 26, 2019#12

                          It is right that the OEM Character Set feature is not working anymore as before since UltraEdit for Windows v24.00 as the code of UltraEdit was revised to make UltraEdit a full Unicode aware application. It still works, but only under special conditions which are as follows:
                          1. The font configured for files which should be edited with enabled OEM Character Set must be Terminal. The feature is not working anymore with other fonts according to my tests as in UltraEdit for Windows < 24.00.
                          2. After startup of UltraEdit and opening a file which should be edited with enabled OEM Character Set it is necessary to enable OEM Character Set for this file activating it also for all other files with a file extension in same group as defined at Advanced - Settings or Configuration - Word wrap / tab settings. In UltraEdit for Windows < 24.00 the OEM Character Set was set after startup of UltraEdit for files with a specific file extension as set on last exit of UltraEdit which means enabled by default.
                          I think these restrictions are not implemented intentionally. They exist most likely because of the code changes done for making UltraEdit a full Unicode aware application.

                          I wrote on last Sunday an issue report and sent it to UltraEdit support. I have attached the issue report and the reply I received on Monday below.

                          It would be good if every UltraEdit user often editing batch files or other files which must be edited with OEM character set reports all OEM Character Set related issues also by email to UltraEdit support. And it would be good to send also feature request emails related to OEM Character Set to UltraEdit support like a request to add this command back to toolbar and ribbon customization dialog. The more users report an issue or request a feature the higher becomes the priority for fixing the issue or implementing the enhancement.

                          The issue report sent by me on 2019-06-24 to IDM support. The RAR archive file is not attached to this post.

                          UltraEdit is - or better was - the only Windows text editor supporting editing files with a specific file extension like BAT, CMD or NFO using OEM character set instead of ANSI character set for non-Unicode files. This makes (made) UltraEdit the best text editor for editing such files, especially when non-ASCII characters needed to be written also into such files like ÄÖÜäöüß in German batch files with information in German for German users.

                          Such a file extension based OEM editing configuration could be very easily achieved in the past by
                          • opening Advanced - Configuration - Editor - Word wrap / tab settings;
                          • clicking on button Change list...;
                          • adding a list item with the file extensions bat cmd nfo and clicking on button OK;
                          • selecting list item bat cmd nfo;
                          • configuring tab stop, indent and word wrap settings and if wanted also a special font like Courier New in my case with larger font size 14 pt than usually used by me;
                          • closing configuration with button OK;
                          • opening any *.bat, *.cmd or *.nfo file;
                          • clicking on item OEM Character Set in menu or toolbar to enable this handy feature for all files with file extension BAT, CMD or NFO.
                          Then *.bat, *.cmd and *.nfo files could be edited with interpreting all characters in those files with OEM character set and getting characters typed on keyboard written into file OEM encoded once this configuration was done by the user.

                          But making this configuration and using OEM character set feature became more and more difficult because of removing first this command from the default menus and toolbars and later even from menu/toolbar customization dialog. However, I found always a solution to have the command to toggle on/off OEM character set feature into the toolbar and posted the necessary steps in forum here.

                          But with UltraEdit v24.00 on becoming a full Unicode aware application the feature to edit files for usage in Windows console with OEM character set does not work anymore automatically after opening such a file and only works with special font setting at all.

                          I created today a configuration for you derived from my configuration for 32 bit UltraEdit v26.10.0.38 to make it easier for your developers to look on this feature. The attached RAR archive file contains:
                          • batch_settings.uec which is a backup of the special configuration with uedit32u.in0, uedit32u.ini, uedit32u.rb0 and my theme file Mofi.ue-theme.These four files are additionally also in RAR archive file.
                          • Test.bat stored in directory C:\Temp on my Windows 7 PC.
                          • batch_configuration_settings.png with a screenshot of the special settings configured by me for *.bat, *.cmd and *.nfo files.
                          • batch_oem_character_set_disabled.png with a screenshot showing how a batch file with ANSI and OEM characters looks like after opening the batch file in UltraEdit after starting UltraEdit.
                          • batch_oem_character_set_enabled.png with a screenshot showing how the batch file with ANSI and OEM characters looks like after enabling manually via the toolbar symbol the OEM character set feature for the batch file.
                          A batch file opened in UltraEdit up to version 23.20 was displayed automatically with OEM character set and typing a non-ASCII character resulted in inserting the character OEM encoded into the batch file. I used font Courier New in the past with font size 14 for *.bat, *.cmd and *.nfo files instead of Courier New 10 pt or 12 pt respectively Dina 10 pt. The custom toolbar contained the command with tooltip Show font with OEM character set mainly as visual indication for me on which file OEM editing is enabled at the moment. I did not really click on this command to toggle OEM character set editing as this was not really necessary most of the time.

                          But the INI setting Force OEM2=1 is not loaded anymore by UltraEdit since version 24.00. The OEM character set feature is always disabled for files of second file extension group after starting UltraEdit and opening a batch file. So I must click once on blue underlined A in my custom toolbar after opening a batch file to enable OEM character set for the batch file.

                          Further the OEM character set feature is not working with font Courier New or any other font than Terminal. I really have no explanation why it works now only with font Terminal. Other fonts like Modern and Roman on which the font settings dialog displays as script also OEM/DOS do also not work with OEM character set enabled as expected.

                          Please do following to better see what I mean:
                          • Extract the files in attached RAR archive best to directory C:\Temp.
                          • Start 32 bit UE 26.10 and restore my configuration from configuration backup file batch_settings.uec using Backup/restore user customization.
                          • Open C:\Temp\Test.bat if not opened automatically.
                          • The file is displayed as captured to batch_oem_character_set_disabled.png with ANSI characters correct displayed and OEM characters not correct displayed indicating that OEM character set is not active as it can be seen also on blue underlined A symbol in custom toolbar.
                          • Click on blue underlined A symbol in custom toolbar and look what happens respectively look on image batch_oem_character_set_enabled.png. Now the ANSI encoded characters are displayed wrong and the OEM characters are displayed correct as expected by me. And the characters ÄÖÜäöüß are inserted correct OEM encoded now on typing them on my German keyboard. It can be seen also that content of Test.bat is displayed with a different font (Terminal instead of Courier New) after manually enabling the OEM character set.
                          What I do not understand is:
                          1. Why is Force OEM2=1 ignored on loading uedit32u.ini?
                            The setting is stored with value 0 or 1 depending on OEM character set currently disabled or enabled on exiting UltraEdit. So it is just not loaded on start of UltraEdit.
                          2. Why does OEM character set feature work now only with font Terminal and does not work anymore with any other font configured for files with file extension bat, cmd, nfo and supporting code page OEM 850?

                          The reply received from IDM support on 2019-06-25:

                          Thank you for your message and the attached archive. I can reproduce the issue you've described here and will ask our developers to investigate and correct this.

                          I'm sorry that I don't know the answer to either of your questions, but I will check with our developers and get back to you with the information I'm provided. I will also be sure to let you know when we have an updated build that we believe resolves this issue.
                          Best regards from an UC/UE/UES for Windows user from Austria