Community

    • Login
    • Search
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search

    ASCII Hex of Current Character

    Help wanted · · · – – – · · ·
    2
    2
    2224
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • iamtestplay
      iamtestplay last edited by

      Hi, Is there a setting in notepad++ that displays the ASCII hex of the current character under the cursor? Edit plus has this feature that displays it beside the line number and column number. If so, how can I activate it in Notepad++?

      Scott Sumner 1 Reply Last reply Reply Quote 0
      • Scott Sumner
        Scott Sumner @iamtestplay last edited by

        @iamtestplay

        I don’t believe this is possible…without scripting. With scripting (e.g. Pythonscript plugin), however, it is fairly straightforward–for the simplistic case of ASCII and not Unicode–if you don’t mind part of the statusbar being utilized for the display:

        Imgur

        Script:

        def callback_sci_UPDATEUI(args):
            c = editor.getCharAt(editor.getCurrentPos())
            try:
                info = "HEX:{0:02X} DEC:{0} '{1}'".format(c, chr(c) if c not in [13, 10, 0] else 'LINE-ENDING' if c != 0 else 'END-OF-FILE')
            except ValueError:
                info = "HEX:?? DEC:?"
            notepad.setStatusBar(STATUSBARSECTION.DOCTYPE, info)
        editor.callback(callback_sci_UPDATEUI, [SCINTILLANOTIFICATION.UPDATEUI])
        
        1 Reply Last reply Reply Quote 1
        • First post
          Last post
        Copyright © 2014 NodeBB Forums | Contributors