Enforce specific encoding

Enforce specific encoding

2
NewbieNewbie
2

    Jul 20, 2017#1

    Hi everyone,

    I have UEX 16.1.0.22 (Suse Linux) and experiencing annoying problems - each time any project I work with I have to switch to Windows-1251 file encoding for each file. (The Windows-1251 encoding is a must from my contractor, I can not make them use other.)

    Even if I connect to server through SSH (or FTP or SAMBA) or create a new file, I have to do A VERY LONG switch for each file: View-> View As-> Central Europe->WIN-1251. Its VERY annoying because I have hundreds of files :( All PHP files on our servers have Windows-1251 encoding.

    Is there any way to enforce it? So that by default all my files are created and treated as specific encoding (Windows-1251 in my case).

    Pleas help! Thank you!

    This really annoying and slows my work a lot!
    PS: Forum search did not give me any results on that matter.

    6,680583
    Grand MasterGrand Master
    6,680583

      Jul 22, 2017#2

      I'm using UltraEdit only on Windows. So I cannot help on UltraEdit for Linux related questions. But there are not many UEX users active on user-to-user forum and therefore I try my best to help you nevertheless. You could ask also IDM support by email for help on your issue.

      In UltraEdit for Windows it is possible since v24.00 to open from menu/ribbon Advanced the Settings or Configuration which I think is Preferences in UEX, navigate to File handling - Encoding and select for Default code page (for ANSI encoding) a code page being different to the code page set in Windows Region and Language settings for system locale (country chooses code page). But most likely UEX 16.1.0.22 does not have such a setting in its preferences.

      In UltraEdit for Windows prior v24.00 it was necessary to click in menu Advanced on menu item Set Code Page/Locale and define in opened dialog a code page and a locale (country) being different to Windows code page / locale settings for non Unicode files. This setting is needed mainly for a locale sort and to predefine the code page for non Unicode files not containing a code page information. Additionally it was necessary to select in menu View in the dialog windows opened with Set Font and Set HEX/Column Mode Font a suitable font for text editing supporting selected code page and set the Script option accordingly. I don't know if UEX has also all those settings.

      On my Windows computers configured for Windows-1252 (Western Europe) as system code page with locale Austria, modifying the settings as written above for UE prior v24.00 for Windows-1251 (Cyrillic) with local Russia changes in INI file of UltraEdit:

      [Settings]
      Locale Code Page=Russian_Russia.1251

      [Font]
      CharSet=204
      CharSetDef=204

      [FixedFont]
      CharSet=204
      CharSetDef=204

      With the default settings Locale Code Page does not exist in the INI file and both CharSet and both CharSetDef have the value 0.

      I hope these information are helpful for you somehow.

      I have read that it is possible on Linux and Mac to set LC_* environment variables in a terminal respectively on command line of a shortcut before starting an application like UEX to use a different locale for this application as set in settings of operating system. Controlling your locale with environment variables, SUSE Doc: Reference - Language and Country-Specific Settings and the UltraCompare forum topic How to fix error "locale nb_NO cannot be set" on starting UCX on Mac OS X 10.11.6?
      Best regards from an UC/UE/UES for Windows user from Austria

      2
      NewbieNewbie
      2

        Jul 24, 2017#3

        Thank you for a reply,

        unfortunately that does not help.
        Code page and locale are set to 1251 (in Preferences, see attachment), can not select in font menu - no such drop-down option, like in old Windows versions. :(
        It looks like setting does not work. :(
        Screenshot_20170724_101700.png (20.23KiB)
        Screenshot_20170724_101624.png (50.27KiB)

        6,680583
        Grand MasterGrand Master
        6,680583

          Jul 24, 2017#4

          Which encoding is automatically detected by UEX after opening a file via FTP?

          In UltraEdit for Windows the encoding of the file is displayed in status bar at bottom of main UltraEdit window.

          Which encoding is configured in preferences for new file?

          In UltraEdit for Windows the default encoding for new files (ANSI, UTF-8, UTF-16) can be also configured in Encoding configuration dialog (v24.00 and later versions) respectively at Editor - New File Creation (prior v24.00).
          Best regards from an UC/UE/UES for Windows user from Austria