How can I create a new UTF-8 blank page/document in advance?

How can I create a new UTF-8 blank page/document in advance?

7
NewbieNewbie
7

    Jan 25, 2018#1

    I essentially always work with ANSI (1252 ANSI Latin I) files and text. But in rare circumstances, I need to work with UTF-8. Most of the time, I'll either open an already extant Unicode file or I'll rely on starting with a blank ANSI file and then paste in one or more Unicode characters, whereupon UltraEdit will automatically switch code sets to one or another Unicode format (great feature!)

    But what if I want to start with a blank page/document that's in UTF-8 before pasting in any Unicode characters first? Can this be done? Maybe a macro or something?

    Thank you!

    6,615549
    Grand MasterGrand Master
    6,615549

      Jan 25, 2018#2

      The configuration setting to create a new file as UTF-8 encoded file is no option for you because you prefer ANSI encoding for most files.

      So you need indeed a macro for quickly creating a new file with UTF-8 encoding set and executed by hotkey.

      Create a new macro for example with name New UTF-8 File with the macro properties Show cancel dialog for this macro and Continue if search string not found not checked and for example with hotkey Ctrl+Shift+N with following two macro command lines:

      Code: Select all

      NewFile
      ASCIIToUTF8
      Save this macro perhaps together with other macros often needed into a macro file. Last configure this macro file to be loaded automatically on startup of UltraEdit.

      Then you can simply press Ctrl+N to create a new ANSI encoded file and Ctrl+Shift+N to create a new UTF-8 encoded file.

      Note: The configuration settings Write UTF-8 BOM header to all UTF-8 files when saved and Write UTF-8 BOM on new files created within this program (if above is not set) at Advanced - Settings or Configuration - File handling - Save determine if the new UTF-8 encoded file is saved without or with UTF-8 BOM on keeping Default selected for Encoding in Save As dialog.
      Best regards from an UC/UE/UES for Windows user from Austria