• FizzyOrange@programming.dev
    link
    fedilink
    arrow-up
    19
    ·
    1 year ago

    Generally a bad idea to use in-band signalling like that. They won’t do anything weird but consider what happens if the actual data contains them.

    • Dave.@aussie.zone
      link
      fedilink
      arrow-up
      8
      ·
      1 year ago

      consider what happens if the actual data contains them.

      Then you’d escape them by using another character in front. But if their data format is ASCII text or is guaranteed not to have characters below ASCII 32 then using ASCII delimiters is fine.

      • lurklurk@lemmy.world
        link
        fedilink
        arrow-up
        5
        ·
        1 year ago

        Then you can just use a conmon delimiter like comma or semicolon or something. It’s better even as you’re less likely to have something that seems to work until your exotic delimiter pops up in the data.

        Better yet, use a commonly used data format like csv or json and don’t build your own

  • bamboo@lemm.ee
    link
    fedilink
    arrow-up
    8
    ·
    1 year ago

    Depends on if you want your data format to be strict ascii. If you don’t care, then sure, why not?

  • MinekPo1 [it/she]
    link
    fedilink
    arrow-up
    2
    ·
    1 year ago

    depends on your format ? if the format is binary anyway or has binary blobs (ie it needs a program that is able to handle octets outside the printable range) and using those characters does not introduce any ambiguities with the format then go for it . ANSI and related control codes all start with 0x1B