Welcome guest. Before posting on our computer help forum, you must register. Click here it's easy and free.

Author Topic: How does one create a batch script that will run under unicode format?  (Read 3401 times)

0 Members and 1 Guest are viewing this topic.

zask

    Topic Starter


    Intermediate

    • Experience: Experienced
    • OS: Other
    okay before i explain anything i just want to say that this is not what im talking about.

    @echo off
    echo ÉÍËÍ» ÚÄÂÄ¿ ÖÄÒÄ· ÕÍÑ͸
    echo º º º ³ ³ ³ º º º ³ ³ ³
    echo ÌÍÎ͹ ÃÄÅÄ´ ÇÄ×Ķ ÆÍØ͵
    echo º º º ³ ³ ³ º º º ³ ³ ³
    echo ÈÍÊͼ ÀÄÁÄÙ ÓÄÐĽ ÔÍÏ;

    it is unicode but the batch file is saved in ANSI format.
    im trying to find out how to make it execute properly in unicode format.

    i found a program online that converts regular batch code into complete Unicode, while at the same time can be saved as unicode format as well as execute properly as an batch file.

    here is an example

    ਍汣൳䀊捥潨漠晦਍楴汴⁥湵捩摯൥挊汯牯〠ൡ琊浩潥瑵⼠⁴″港扯敲歡਍捥潨吠楨⁳獩愠甠楮潣敤戠瑡档映汩൥瀊畡敳ഠ攊档湡⁹潣浭湡⁤慣敢洠摡⁥湵敲摡汢⁥湩琠硥⁴摥瑩牯⹳਍慰獵൥

    copy and paste the above code in notepad (or whatever) and right before you save a name and extension to the file look below to find and enable the Unicode option or else it will not work.

    okay if you have done everything right, it should have posted some green text stating "This is a unicode batch file", "any command can be made unreadable in text editors."  any my question is does anyone know how to do this or any information on where i can find out how this works because ive looked everywhere on the internet and no hope has yet to come.

    zask

      Topic Starter


      Intermediate

      • Experience: Experienced
      • OS: Other
      Re: How does one create a batch script that will run under unicode format?
      « Reply #1 on: February 24, 2016, 12:04:26 PM »
      thanks

      patio

      • Moderator


      • Genius
      • Maud' Dib
      • Thanked: 1769
        • Yes
      • Experience: Beginner
      • OS: Windows 7
      Re: How does one create a batch script that will run under unicode format?
      « Reply #2 on: February 24, 2016, 03:29:06 PM »
      There ya go talkin to yourself again...
      " Anyone who goes to a psychiatrist should have his head examined. "

      BC_Programmer


        Mastermind
      • Typing is no substitute for thinking.
      • Thanked: 1140
        • Yes
        • Yes
        • BC-Programming.com
      • Certifications: List
      • Computer: Specs
      • Experience: Beginner
      • OS: Windows 11
      Re: How does one create a batch script that will run under unicode format?
      « Reply #3 on: February 24, 2016, 05:06:29 PM »
      1. Prepend normal text/batch file with "ÿþ"

      2. Close and re-open the file.

      It's not actually unicode, the only difference is that the byte characters FF FE are a "BOM" or Byte Order Mark. At the start of text file it means the file is unicode and what order the bytes should be expected in. If you open a file starting with a BOM, the editor will figure it's Unicode- so Notepad, and most other text editors, will open your file as if it was.

      Command prompt doesn't care about unicode and treats the BOM as whitespace when it interprets it.

      I was trying to dereference Null Pointers before it was cool.

      zask

        Topic Starter


        Intermediate

        • Experience: Experienced
        • OS: Other
        Re: How does one create a batch script that will run under unicode format?
        « Reply #4 on: February 26, 2016, 09:57:22 PM »
        1. Prepend normal text/batch file with "ÿþ"

        2. Close and re-open the file.

        It's not actually unicode, the only difference is that the byte characters FF FE are a "BOM" or Byte Order Mark. At the start of text file it means the file is unicode and what order the bytes should be expected in. If you open a file starting with a BOM, the editor will figure it's Unicode- so Notepad, and most other text editors, will open your file as if it was.

        Command prompt doesn't care about unicode and treats the BOM as whitespace when it interprets it.

        Thank you, ill keep that in mind.