Loading ...
Sorry, an error occurred while loading the content.

identifying characters

Expand Messages
  • Axel Berger
    Sometimes text copied from various sources contains funny characters. Some are only shown as a rectangle in my stranard editing font. Is there an easy way to
    Message 1 of 3 , May 18, 2011
    View Source
    • 0 Attachment
      Sometimes text copied from various sources contains funny characters.
      Some are only shown as a rectangle in my stranard editing font. Is there
      an easy way to find out what a character is, i.e. get its ASCII value? I
      could make something out of "get selection" and a message box, but
      perhaps a solution exists already.

      Danke
      Axel
    • John Shotsky
      I often get characters like that. You can usually use the clip below to display their value: (Courtesy of Sheri, if I remember right.) ^!Info
      Message 2 of 3 , May 18, 2011
      View Source
      • 0 Attachment
        I often get characters like that. You can usually use the clip below to display their value: (Courtesy of Sheri, if I
        remember right.)

        ^!Info Dec=^$CharToDec(^$StrCopyLeft("^$GetSelection$";1)$)$

        ^!Info Hex=\x^$IntToHex(^$CharToDec(^$StrCopyLeft("^$GetSelection$";1)$)$)$



        Otherwise, I use EditPad Pro free version which has a hex editor built in, to display the characters. Often, they are
        Unicode, which won't always display in NoteTab.

        Regards,

        John





        From: ntb-clips@yahoogroups.com [mailto:ntb-clips@yahoogroups.com] On Behalf Of Axel Berger
        Sent: Wednesday, May 18, 2011 04:04
        To: NoteTab Clips
        Subject: [Clip] identifying characters





        Sometimes text copied from various sources contains funny characters.
        Some are only shown as a rectangle in my stranard editing font. Is there
        an easy way to find out what a character is, i.e. get its ASCII value? I
        could make something out of "get selection" and a message box, but
        perhaps a solution exists already.

        Danke
        Axel





        [Non-text portions of this message have been removed]
      • diodeom
        ... In stuff I paste these rectangles commonly represent unprintable page breaks or form feeds. (Hitting Ctrl+Enter should reproduce one.) They can be
        Message 3 of 3 , May 19, 2011
        View Source
        • 0 Attachment
          Axel wrote:
          >
          > Sometimes text copied from various sources contains funny characters.
          > Some are only shown as a rectangle in my stranard editing font. Is there
          > an easy way to find out what a character is, i.e. get its ASCII value?
          >

          In stuff I paste these rectangles commonly represent unprintable page breaks or "form feeds." (Hitting Ctrl+Enter should reproduce one.) They can be found/fixed with "^B" in a non-regex search or regex "\f" or "\x0C" in hex.

          But (and it's a huge but), as John hints, there is a buttload of characters that cannot have equivalents in NoteTab's default ANSI of your localized encoding (e.g. Latin 1 or Windows-1252, which is limited to measly 256, I think). Some of them are bound to come out transformed into who-knows-what as a result of NT's utterly hopeless attempts to substitute them with something available in its current character map. Well, that's expected; however, even pasting to properly encoded document doesn't assure success. Here's the clip I use (with truncated list of choices):

          ^!TextToFile "%Temp%\_.txt" >
          ^!Open "%Temp%\_.txt" /C=^?{(H=3)==_UTF-8^=65001|8859-2^=28592|8859-5^=28595}

          (BTW, the list of code page identifiers is available at:
          http://msdn.microsoft.com/en-us/library/dd317756(VS.85).aspx
          Also, the first four bullets under the heading "NoteTab v6.12" in the Help ==> 'What's New' file could be of pertinent interest.)

          Prior to pasting some potentially troublesome-to-NT stuff, it might help to see Clipboard's raw content and monitor conversion. (Note: the clipboard viewer was nixed in Vista/7, though it can be easily copied from XP @ C:\WINDOWS\system32\clipbrd.exe). Here's probably one of the most "complex" clips ever written:

          H="View Clipboard"
          ^!Clipbrd
        Your message has been successfully submitted and would be delivered to recipients shortly.