alt codes not working



  • I like to use alt codes for bullets and notice some don’t work like they do in Windows. For example alt+8 just gives me a ? with a box around it but should be a symbol like this ◘. Any ideas how to fix this? I have encoding set to UTF-8.



  • Hello, George Reschke,

    It works nice, in my 6.9.1 local N++ configuration :-)) Just :

    • Press the ALT key

    • Type a number between 1 and 31, on your numeric keyboard, without any leading zero !

    • Release the ALT key

    You’ll obtain the 31 following characters, below :

    ☺ ☻ ♥ ♦ ♣ ♠ • ◘ ○ ◙ ♂ ♀ ♪ ♫ ☼ ► ◄ ↕ ‼ ¶ § ▬ ↨ ↑ ↓ → ← ∟ ↔ ▲ ▼
    

    IMPORTANT :

    Your file must have a Unicode encoding, that is to say, one of the four following encodings :

    • UTF-8
    • UTF-8 BOM
    • UCS-2 BE BOM
    • UCS-2 LE BOM

    On the other hand, keep in mind that, with similar gestures :

    • ALT + a number n, from 001 to 255, writes the character, of code n, from the appropriate Windows OEM Code page, on your system. Refer to the link, below :

    http://msdn.microsoft.com/en-us/goglobal/bb964655

    For instance, as I’m French, it’s the 850 (Multilingual Latin I)

    • ALT + a number n, from 0001 to 0255, writes the character, of code n, from the appropriate Windows SBCS Code page, on your system. Refer to the link, below :

    http://msdn.microsoft.com/en-us/goglobal/bb964654,

    Again, on my system, it’s the 1252(Latin I) code page. You can see all the characters of this table, by selecting, in N++, the menu option Edit - Character Panel !


    You may, also, have a glance to an other post, on SourceForge, written on February 2015, about that topic :

    https://sourceforge.net/p/notepad-plus/discussion/331753/thread/e5b72494/#b5c1

    Best Regards,

    guy038



  • guy038, you nailed it. It was my font which was pointed out in the last link in your post. Nice job and much appreciated.

    George



  • @George Reschke

    In Npp, guy038’s solution works from decimal char code 1 up to 32 only.
    The subsequent characters, up from code 33, have been substituted by various npp control codes.
    Look at this two alternative solutions I’m using with success instead:
    https://notepad-plus-plus.org/community/topic/11609/how-to-enter-character-codes

    Cheers
    Thempleton Aart



  • Hello, George Reschke, Thempleton Aart, Claudia, and All,

    @Thempleton Aart :

    I’m a bit confused because, the two methods, described in my previous post, for getting characters, with code between 1 and 255, do work on my N++ configuration ! Of course, when I wrote the expression “ALT + a number n, from …”, there’s no need to press on the numeric pad key +. That’s just a shortcut for the word and !

    Anyway, many thanks for giving the link below :

    https://notepad-plus-plus.org/community/topic/11609/how-to-enter-character-codes/2

    Indeed, because the Claudia Franck’s method, about adding a registry entry, works perfectly well :-)). That’s incredible : although involved, since more than 30 years, with computer science, I’ve never heard about that third way to get any Unicode character !!

    I found out, on Wikipedia, these three interesting links, below, about all the Input methods :

    https://en.wikipedia.org/wiki/Unicode_input

    https://en.wikipedia.org/wiki/Unicode_input#Hexadecimal_code_input

    https://en.wikipedia.org/wiki/Alt_code


    So, once the Claudia’s registry trick realized, on your system, the third and general method for getting any Unicode character, with code-point between 0001 and ffff, is :

    • Hold down the ALT key

    • Type the + key, on the NUMERIC keypad

    • Type the hexadecimal code-point of the character, using the 0 to 9 keys, on the numeric keypad AND/OR the normal a to f keys, of the alphanumeric keypad

    • Release the ALT key

    => The appropriate character is written, at cursor location, in your current file

    NOTES :

    • You must lock the numeric keypad in “number-mode” ( the NumLock indicator is active and switched on )

    • Of course, the current N++ font must be able to reproduce the glyph of these input characters !

    • All the characters, with code-point outside the Basic Multilingual Plane ( between \x10000 and \x10ffff ) CANNOT be obtained, from within Notepad++, with this method :-((


    EXAMPLES, by increasing Unicode code-point :

    ( IMPORTANT : the Courrier New font must be selected, for the N++ Default Style style !! )

    • ALT , + , 0 , 0 , 0 and 1 writes the Start of Heading control character SOH, 

    • ALT , + , 0 , 0 , 9 and a writes the Single Character Introducer control character SCI, š

    • ALT , + , 0 , 0 , a and e writes the Registered sign, ®

    • ALT , + , 0 , 1 , 6 and 6 writes the Latin Capital letter T with Stroke, Ŧ

    • ALT , + , 0 , 3 , a and 6 writes the Greek Capital letter Phi, Φ

    • ALT , + , 0 , 4 , 4 and e writes the Cyrillic Small letter Yu, ю

    • ALT , + , 2 , 0 , 3 and 0 writes the Per Mille sign,

    • ALT , + , 2 , 0 , 3 and c writes the Double Exclamation Mark symbol,

    • ALT , + , 2 , 0 , a and 7 writes the Spanish Peseta sign,

    • ALT , + , 2 , 0 , a and c writes the Euro sign,

    • ALT , + , 2 , 1 , 5 and e writes the Fraction Seven Eights symbol,

    • ALT , + , 2 , 2 , 1 and e writes the Infinity symbol,

    • ALT , + , 2 , 5 , 6 and c writes the Double Vertical and Horizontal Box drawing symbol,

    • ALT , + , 2 , 5 , b and a writes the Black Right-Pointing Pointer symbol,

    • ALT , + , 2 , 6 , 6 and 3 writes the Black Club Suit symbol,

    • ALT , + , f , 0 , 0 and 2 writes the Latin Small Ligature fl,

    • ALT , + , f , b , 3 and c writes the Hebrew letter Lamed with Dagesh,

    • ALT , + , f , b , 6 and a writes the Arabic letter Veh Isolated Form,

    • ALT , + , f , f , f and f writes the Last NON character of the BMP, according to its UTF-8 syntax, xEF xBF xBF

    Best Regards,

    guy038


Log in to reply