How to copy Cyrillic clipboard in Win Vista to UE window

How to copy Cyrillic clipboard in Win Vista to UE window

2
NewbieNewbie
2

    Nov 08, 2008#1

    I need to copy Cyrillic (Windows-1251) text from my browser to UE window (in Win Vista). I can easily copy this text to the Notepad, but UE does not recognize it - all characters are replaced with '?'. I tried using different font settings and conversions in UE, but nothing helps. I also tried to save UTF-8 file from the Notepad and load it into UE - the same problem (all characters are replaced with unreadable symbols).
    Does anybody know how to do this?

    Thanks.

    6,603548
    Grand MasterGrand Master
    6,603548

      Nov 08, 2008#2

      Read whole power tip Unicode text and Unicode files in UltraEdit/UEStudio. I guess, you have not specified the font and code page correct.
      Best regards from an UC/UE/UES for Windows user from Austria

      60
      Advanced UserAdvanced User
      60

        Nov 12, 2008#3

        I use multiple languages, including Russian in the same file. I use Vista too. I simply set the file type to Unicode and I can paste, copy and type in multiple languages in the UE document with no problems.

        2
        NewbieNewbie
        2

          Nov 15, 2008#4

          Thank you for the replies.

          Actually, I can create text files in UE in different languages w/o any problems. I can save files created in UE, including UTF-8 files, and load them back. All these operations are supported by UE by using different fonts and encoding conversions.

          What I'm talking about is copying text directly from browser window to UE window. This operation involves internal windows clipboard that, apparently, supports different encodings (because I can copy Cyrillic text to Notepad). It seems, however, that UE supports only copying from clipboard in the default OS encoding. I made several experiments with copying Cyrillic text from browser to UE - it works only if I change the browser encoding to the default OS encoding. In this case, the browser text becomes unreadable (due to wrong encoding), but copying works fine and Cyrillic text in UE is OK.

          Eventually, I made this copying operation work by changing the OS (Win Vista) locale to Russian. There are some annoying side effects, but Cyrillic text now can be copied directly from browser to UI.

          Thanks again.

          60
          Advanced UserAdvanced User
          60

            Nov 18, 2008#5

            I am able to copy/paste to/from UE/IE in Russian without changing my keyboard. It is US by default. I make sure that the file is first a unicode file.

            2
            NewbieNewbie
            2

              Dec 02, 2008#6

              I do it all the time for many years :) - all my Russian webpages I did using UE :)

              I do it often at work so changing system code page to Cyrillic (= changing system locale to Russian) is not an option  :D

              The problem with ??? happens only if that other program is a Unicode one.

              Please see work-around (which I use every day - I use Netscape 4 based one) methods here:

              http://RusWin.net/cp_e.htm or same in Russian - http://RusWin.net/cp_r.htm

              :idea:

              P.S. sklad2 wrote:
              I simply set the file type to Unicode
              I do not want to create Unicode files. I need non-Unicode plain text .htm files for my website.

              6,603548
              Grand MasterGrand Master
              6,603548

                Dec 02, 2008#7

                To schwaetzer, PaulGor:

                Why making it more complicated than necessary?

                I did following with UE v14.00b+1 on a German Windows 98SE with Windows regional and language settings set to German (Austria).


                I opened the Russian page of PaulGor in Opera and copied the first Russian word into the Windows clipboard.

                If I paste this word now into a new ANSI file, I get only ???????? as you.

                So I clicked on View - Set Code Page and selected 1251 (ANSI - Cyrillic).

                UltraEdit informed me with a message that I have to change also the font to display the text correct. Therefore I clicked on View - Set Font and changed the script to Cyrillic (font is Courier New Regular 10pt).

                Now I created a new ASCII/ANSI file with Ctrl+N and used File - Conversions - ASCII to Unicode.

                The editing environment is set correct now for working with Russian text on my German Win98SE with English UltraEdit.

                I pressed Ctrl+V and the Russian word from the Windows clipboard is correct inserted.

                But the file is currently a Unicode file and not an ANSI file. So I need to execute File - Conversions - Unicode to ASCII to get the same result in ANSI.


                However, that are still a lot of steps when the files should be ANSI files and pasting Russian Unicode text is needed often. So how can the steps above be automized?

                Well, setting the correct code page and the correct script for the font cannot be automized. But I guess, you have already set these 2 settings correct when you work daily with Russian text. Also important is that Adanced - Set Code Page/Locale is set to 1251 (ANSI - Cyrillic) and Russian, Russia if in the regional and language settings of Windows is something different specified as on my computer. This setting determines the default code page for new files.

                But all other steps can be automized using a macro, for example with named "Paste Unicode", which is stored in a macro file which is automatically loaded on startup of UltraEdit. For fast executing the macro when needed it is a good idea to assign a hotkey, for example Alt+Shift+V, or a chord like "V V".

                The macro code is:

                NewFile
                ASCIIToUnicode
                Paste
                UnicodeToASCII
                SelectAll
                Copy
                CloseFile NoSave
                Paste


                Note: The configuration setting Move to nearest left tab after current tab is closed at Advanced - Configuration - Application Layout - File Tabs must be unchecked.

                So with this macro in the automatically loaded macro file and correct code page and font set, you just need to press Alt+Shift+V or fast twice v to paste the Russian Unicode text into the ANSI file currently opened in UltraEdit replacing existing selection or inserted at current cursor position as usual.
                Best regards from an UC/UE/UES for Windows user from Austria

                2
                NewbieNewbie
                2

                  Dec 02, 2008#8

                  1) Many people cannot set Russian in Control Panel (as me for example).

                  2) Many people (and me) use UE not exclusively for Russian, I use it for German and Japanese, etc.

                  3) The procedure you described (to Unicode then from Unicode, etc.) is, IMHO, more complicated then my 2-second copy of the text from browser to an intermediate place and then another 2 seconds to copy from that place to UE 8)

                  And my method does not require any change of UE setting (like code page setting to Russian windows-1251)

                  So for Russian-only your approach is probably good, but if a person does not want to setup UE as "Russian" (keeping default settings) and does not want to setup his OS as "Russian" then my approach is more applicable.

                  :roll:

                  6,603548
                  Grand MasterGrand Master
                  6,603548

                    Dec 03, 2008#9

                    PaulGor wrote:1) Many people cannot set Russian in Control Panel (as me for example).
                    I haven't done this too. I use German (Austria).
                    PaulGor wrote:2) Many people (and me) use UE not exclusively for Russian, I use it for German and Japanese, etc.

                    3) The procedure you described (to Unicode then from Unicode, etc.) is, IMHO, more complicated then my 2-second copy of the text from browser to an intermediate place and then another 2 seconds to copy from that place to UE.
                    My suggestion is faster than your approach when using the macro as explained. Of course UltraEdit must be setup for Cyrillic as you have explained must be done also for Netscape Composer or chosen during the conversion for UniPad.

                    For working with Cyrillic ANSI text the font with the correct script must be selected or the characters will not be correct displayed. But if you don't want to change the default settings of UltraEdit because you work normally with other languages / code pages I have another idea.

                    In the directory of uedit32.ini (normally %appdata%\IDMComp\UltraEdit) copy the INI with a new name into the same directory, for example ue_cyrillic.ini.

                    Next create a shortcut and/or a user tool inside UltraEdit to run UltraEdit in a new instance with that INI file instead of using the default uedit32.ini. The command line is:

                    "path to UE program directory\uedit32.exe" /i="path to alternate INI\ue_cyrillic.ini" /fni

                    Now you can click on this shortcut or run it as user tool from within UltraEdit to open a second instance of UltraEdit which of course must be set up once for Cyrillic as I have written in my previous post.

                    With appropriate steps it would be even possible to associate certain file extensions for being opened with UltraEdit using Cyrillic settings instead of default UE. It would be also possible to create the alternate INI on the fly from the default uedit32.ini and change the settings before launching UE with that alternate INI using a batch file (shortcut/user tool) or a macro (user tool only).

                    By the way: Do you know the Code Page Detection settings at Advanced - Configuration - File Handling. Of course automatically detecting the correct code page can work only if the file opened contains a code page declaration as typically present in HTML or XML files.
                    Best regards from an UC/UE/UES for Windows user from Austria