Open file(s) with selected encoding

Open file(s) with selected encoding

2
NewbieNewbie
2

    Nov 09, 2009#1

    Hello there,

    I'm using UEX, 1.0.0.4 on a SUSE 11.0 system.

    I'd like to edit some files with saved encoding latin 1.
    Kate, and other linux editors are telling me - the files are with latin 1 encoded !

    Every time I open these files with UEX, they are shown with UTF-8 encoding.
    So all special characters (äüö) - I'm from Germany, are not readable.
    When I try to convert a file to latin 1, these special characters are totally wrong and unreadable.

    How can I tell UEX to open a file with a defined encoding ?
    Without converting?

    Kind regards
    Stefan Kubina
    With kind regards
    Stefan

    1
    NewbieNewbie
    1

      Nov 18, 2009#2

      Well, if someone discover the answer, tell me also. :)

      Actually, I have the same problem, with files encoded as ISO-8859-1. I'm using UEX 1.0.0.5 on Ubuntu 9.04 (32 bits)

      Another collateral effect which I perceived is the Function List doesn't work properly on these files.

      1
      NewbieNewbie
      1

        Nov 19, 2009#3

        I have the same problem. For me it seems the UEX does not recognize any encoding and justs sets UTF-8.
        And the worst thing is that reopen files at startup all reopened files have wrong encoding.

        Maybe a prefered encoding could be defined at project level that would help me much.

        2
        NewbieNewbie
        2

          Nov 19, 2009#4

          Hi folks,

          that's what I got from IDM per email, start reading from the bottom of the quote:
          Hello Stefan,

          Thanks for your response. There is not a change planned for UEx which will allow you to specify the encoding of an entire project, however I do see how this could be useful, so we will consider including this in a future release.

          Thanks,
          Ben


          Stefan wrote:
          Thanks for your answer,

          that will help first.
          So I have to open all the files with the 'Open-file dialog', and project-files can not be opend with a double-click from the project-list...
          Is there a change planned - so that I can define the encoding for the project ?


          IDM Computer Solutions, Inc. wrote:
          Hello Stefan,

          Thanks for your message. UEx doesn't automatically detect the file type. As such, you would need to manually set the file type in the File : Open dialog. If you set the file encoding in the Open dialog, then open the file, I believe you will see what you are expecting.

          Thanks, Andy


          Stefan wrote:
          Hello there,

          I'm using UEX, 1.0.0.4 on a SUSE 11.0 system.

          I'd like to edit some files with saved encoding latin 1.
          Kate, and other linux editors are telling me - the files are with latin 1 encoded !
          These files are Perl scripts, etc. - simple textfiles.

          Every time I open these files with UEX, they are shown with UTF-8 encoding.
          So all special characters (äüö) - I'm from Germany, are not readable.
          They are used in comments etc.
          When I try to convert a file to latin 1, these special characters are totally wrong and unreadable.

          How can I tell UEX to open a file with a defined encoding ?
          Without converting?

          Kind regards
          That means for UEX 1.0.0.5:
          - no preferences for that topic
          - maybe in the future
          - open files with the File Open dialog
          - opend files can be changed by menu - View - View As (File Encoding) - Western
          With kind regards
          Stefan

          1
          NewbieNewbie
          1

            Nov 19, 2009#5

            Hello everyone, sorry for my bad English.
            I use Ubuntu 9.10 and I had the same problem because the files that I program are encoded in ISO-8859-1 and every time I open the were converted to UTF-8.

            The solution I found was the following:

            as root

            move the binary
            # mv /usr/bin/uex /usr/bin/uex.bin

            Edit a bash script for calling uex.bin
            # vim /usr/bin/uex

            #/bin/bash
            export LANG = es_UY.ISO-8859-1
            /usr/bin/uex.bin

            The files are opening now as ISO-8859-1

            I hope that this is useful.

            Greetings.-

            2
            NewbieNewbie
            2

              Nov 27, 2009#6

              Same problem here! (Uedit/Win32 user since 1999, Uex user since 1 week).

              My OS (Ubuntu) is set up for en_US.UTF-8.
              It happens quite often that I work on one project that has its files encoded in UTF-8 and (in parallel) on another project that has its files encoded in ISO-8859-1/2.

              This can be easily done with Uedit/Win32. (It is set up to open files as ISO-8859 unless UTF-8 ist detected. Uedit says "U8-UNIX" in the status line whenever UTF-8 is detected in a file.)

              Not possible with Uex?? (Opening files from the Uex file dialog and manually specifying encoding is just too uncomfortable and slow.)

              Cheers to the IDM team for providing Uex. (I bet you're reading this forum despite the official disclaimer - and you should!)

              My Uex top issues after initial excitement and 1 week of daily use:
              - Lack of configurable encoding detection or at least project dependent encoding setting.
              - Really slow scrolling off the page (as lots of others already reported in this forum).
              - Some kybd shortcuts not configurable (what happended to ctrl-up/downarrow for scrolling e.g.?)
              - Typing over a selection sometimes removes more than the selection.

              General Impression:
              - More little Uedit/Win32 features still lacking than I expected in a copy that is thought to be "ready to sell".

              I have 3 weeks of testing remaining and I'll definitely order the multiplatform upgrade if (within this period) I see some progress with the issues that I described.

              No bug reports filed so far from my side because the issues have been reported by others and they are quite obvious.

              Regards,
              Michael

                Nov 27, 2009#7

                Concerning sernunez' temporary solution for starting Uex with default ISO-8859-x on a UTF8 system:

                If upon launching Uex you get a
                "Gdk-WARNING **: locale not supported by C library"
                (might happen on Ubuntu) just do the following once (e.g.):

                sudo localedef -c -f ISO-8859-1 -i en_US en_US.ISO-8859-1

                Then again
                export LANG=en_US.ISO-8859-1
                /usr/bin/uex

                or use a script (I called it uexiso because I still want to be able to launch Uex in my default locale UTF8):
                ----
                #/bin/bash

                export LANG=en_US.ISO-8859-1
                /usr/bin/uex
                ----

                Seems to work well - at least under Ubuntu Jaunty.

                6,603548
                Grand MasterGrand Master
                6,603548

                  Jul 20, 2011#8

                  List of latest changes for UltraEdit for Linux v2.1.0.3 contains the entry
                  • Ability to set default encoding for open files (when auto-detection can't determine format)
                  I'm not using UEX and therefore can't verify that statement, but it looks like UEX v2.2.0.5 (and previous versions) supports now auto-detection of encodings and offers an option to set the default encoding.