Connect with us

How to create your own electronic symbols using ALT-codes or UTF-16:

Discussion in 'General Electronics Discussion' started by FuZZ1L0G1C, May 23, 2019.

  1. FuZZ1L0G1C

    FuZZ1L0G1C

    367
    112
    Mar 25, 2014
    When typing in equations, or adding a unit symbol to a value, there may be a need to generate a specific symbol.
    On the taskbar of this window you can see omega Ω and micro μ, but what if you want more?
    Or maybe you want to create these offline.

    Most electronic symbols can be found in the Greek language font code-page 3.
    Taking each 256 characters as one code page, this equates to 3*256=768 decimal.

    An example of some language code pages is shown below:
    00=Latin1; 01=Extended Latin; 02=Arabic; 03=Greek; 04=Cryllic.
    Some languages may overlap more than one CP, while others may have several character sets per CP.

    Alt-codes are probably the easiest way to quickly insert a Greek symbol when using a text editor such as Notepad.
    Remembering each and every Alt-code is another story.
    The same goes for UTF-16 code, which requires a HEX editor to properly format combinations of Latin1 (English text CP00) and Greek symbols (CP03).

    Codes may or may not be allowed on the forum, so it may be best to formulate on your PC, then do a cropped screen shot.
    Hence the two screen-shots attached, showing both methods.

    To create an ALT-code symbol, hold down Alt key, type in the code without leading zero's, then release Alt.
    This is usually printed in books or web articles as {Alt+nnn}. May not have parentheses if alone.
    Note: The 768+ decimal value for the code page / character value does not equal the Alt code.
    Alt codes repeat every 256 values, so you can subtract 256, 512 or 768 from the shown value instead, producing the same result.

    UTF-16 is a specially-formatted document, the two header bytes FF FE telling Windows that this is a UTF-16 formatted text document.

    There are several points to note when creating UTF-16 documents:
    • Each readable character or control character is always character first then code page.
    • For example, the LF+CR code for a new line is usually 0D 0A hex.
    • The space code is usually 20 hex.
    • In UTF-16 these are CP00 so would be expanded to 0D 00 0A 00 and 20 00.
    • For Latin1 (English/Western) text the same CP00 extension applies.

    So (example) 180 uF. would be (unicode):
    31 00 38 00 30 00 20 00 BC 03 46 00
    Viewed as 2-byte pairs this would be (including header):
    FFFE 3100 3800 3000 2000 BC03 4600 2E
    hdr 1 8 0 spc u F .

    Or (Alt code) comparing - 768 values as mentioned above:
    180 {Alt+998}F. or 180 {Alt+230}F.
    Subtracting 768 makes usable electronic / math characters (only a few basic) range from 224 to 251.

    In Excel, the UNICHAR function is used. =unichar(decimal)
    HTML files use &#decimal;

    Source for more about Excel functions:
    https://www.techonthenet.com/excel/formulas/unichar.php
    Greek symbols Alt codes.png Greek symbols UTF16.png
     
    Last edited: May 23, 2019
    Harald Kapp likes this.
Ask a Question
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.
Electronics Point Logo
Continue to site
Quote of the day

-