Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. resource wanted - print control / color codes

resource wanted - print control / color codes

Scheduled Pinned Locked Moved C / C++ / MFC
linuxc++agentic-aiquestionlearning
5 Posts 2 Posters 2 Views 1 Watching
  • 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.
  • L Offline
    L Offline
    Lost User
    wrote on last edited by
    #1

    After putting "bluetoothctl" command into "terminal", yes Linux , I have the following plain text in "terminal".

    bluetoothctl Agent registered [bluetooth]#

    This is my current output as seen by my C++ code.

    linea: "Waiting to connect to bluetoothd...\u001B[0;94m[bluetooth]\u001B[0m# \u001B[0;94m[bluetooth]\u001B[0m# Agent registered" linea: "\u001B[0;94m[bluetooth]\u001B[0m# "

    I am looking / asking for assistance finding the resource / documentation where the "control codes" are described. ( I am NOT asking for code ) I couldn't find anything close to them in "printf". I am not sure what application is processing the "bluetoothctl" command , perhaps "bash"? It really does not matter - all I need is link to whatever app is putting these " control codes " in so I can write my C code to delete them. Thanks

    L P 4 Replies Last reply
    0
    • L Lost User

      After putting "bluetoothctl" command into "terminal", yes Linux , I have the following plain text in "terminal".

      bluetoothctl Agent registered [bluetooth]#

      This is my current output as seen by my C++ code.

      linea: "Waiting to connect to bluetoothd...\u001B[0;94m[bluetooth]\u001B[0m# \u001B[0;94m[bluetooth]\u001B[0m# Agent registered" linea: "\u001B[0;94m[bluetooth]\u001B[0m# "

      I am looking / asking for assistance finding the resource / documentation where the "control codes" are described. ( I am NOT asking for code ) I couldn't find anything close to them in "printf". I am not sure what application is processing the "bluetoothctl" command , perhaps "bash"? It really does not matter - all I need is link to whatever app is putting these " control codes " in so I can write my C code to delete them. Thanks

      L Offline
      L Offline
      Lost User
      wrote on last edited by
      #2

      \u001B is an "escape" (27).

      "Before entering on an understanding, I have meditated for a long time, and have foreseen what might happen. It is not genius which reveals to me suddenly, secretly, what I have to say or to do in a circumstance unexpected by other people; it is reflection, it is meditation." - Napoleon I

      1 Reply Last reply
      0
      • L Lost User

        After putting "bluetoothctl" command into "terminal", yes Linux , I have the following plain text in "terminal".

        bluetoothctl Agent registered [bluetooth]#

        This is my current output as seen by my C++ code.

        linea: "Waiting to connect to bluetoothd...\u001B[0;94m[bluetooth]\u001B[0m# \u001B[0;94m[bluetooth]\u001B[0m# Agent registered" linea: "\u001B[0;94m[bluetooth]\u001B[0m# "

        I am looking / asking for assistance finding the resource / documentation where the "control codes" are described. ( I am NOT asking for code ) I couldn't find anything close to them in "printf". I am not sure what application is processing the "bluetoothctl" command , perhaps "bash"? It really does not matter - all I need is link to whatever app is putting these " control codes " in so I can write my C code to delete them. Thanks

        L Offline
        L Offline
        Lost User
        wrote on last edited by
        #3

        You need to show us the code that does the printing.

        1 Reply Last reply
        0
        • L Lost User

          After putting "bluetoothctl" command into "terminal", yes Linux , I have the following plain text in "terminal".

          bluetoothctl Agent registered [bluetooth]#

          This is my current output as seen by my C++ code.

          linea: "Waiting to connect to bluetoothd...\u001B[0;94m[bluetooth]\u001B[0m# \u001B[0;94m[bluetooth]\u001B[0m# Agent registered" linea: "\u001B[0;94m[bluetooth]\u001B[0m# "

          I am looking / asking for assistance finding the resource / documentation where the "control codes" are described. ( I am NOT asking for code ) I couldn't find anything close to them in "printf". I am not sure what application is processing the "bluetoothctl" command , perhaps "bash"? It really does not matter - all I need is link to whatever app is putting these " control codes " in so I can write my C code to delete them. Thanks

          L Offline
          L Offline
          Lost User
          wrote on last edited by
          #4

          Whatever code is producing that output, it is trying to set coloured text via the ANSI escape codes - Wikipedia[^].

          1 Reply Last reply
          0
          • L Lost User

            After putting "bluetoothctl" command into "terminal", yes Linux , I have the following plain text in "terminal".

            bluetoothctl Agent registered [bluetooth]#

            This is my current output as seen by my C++ code.

            linea: "Waiting to connect to bluetoothd...\u001B[0;94m[bluetooth]\u001B[0m# \u001B[0;94m[bluetooth]\u001B[0m# Agent registered" linea: "\u001B[0;94m[bluetooth]\u001B[0m# "

            I am looking / asking for assistance finding the resource / documentation where the "control codes" are described. ( I am NOT asking for code ) I couldn't find anything close to them in "printf". I am not sure what application is processing the "bluetoothctl" command , perhaps "bash"? It really does not matter - all I need is link to whatever app is putting these " control codes " in so I can write my C code to delete them. Thanks

            P Offline
            P Offline
            Peter_in_2780
            wrote on last edited by
            #5

            They are ANSI escape codes for colors, etc. See, for example, ANSI Escape Codes · GitHub[^]

            Software rusts. Simon Stephenson, ca 1994. So does this signature. me, 2012

            1 Reply Last reply
            0
            Reply
            • Reply as topic
            Log in to reply
            • Oldest to Newest
            • Newest to Oldest
            • Most Votes


            • Login

            • Don't have an account? Register

            • Login or register to search.
            • First post
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • World
            • Users
            • Groups