Implementation

Design considerations for developers

Text Editors

If you’re working on adding .ccsv capabilities to a text editor there are a few design concepts that you will want to address.

  1. Upon reading from file or other sources, you probably want to do a global replace of any unit separator (US) characters with a visible glyph. If you are supporting UTF-8 (recommended), there are visual representations of all of the control characters in the x2400 block. You can replace the (US) character with x241F; For the record separators, consider replacing with x241E and a carriage return. This will visually put each record on a separate line which can make the file easier to read. The visual control characters are just a suggestion. You could use any visual representation you like.

  2. While your user is working with your program, you’ll need to provide an easy way for them to type the replacement characters into the file. A button to add the x241f character (or your own pictograph) and another to add your record separator character followed by a carriage return.

  3. Prior to saving to file, you will want to do the reverse of what was done in item 1 above.

  4. Trim any trailing (RS) character from the end of the last record if there is one.

Grid Editors

If your application displays data in some sort of grid display like a spreadsheet, you should be able to use the control character delimiters as-is. You should not need to do any sort of escaping of characters in the body of the user’s data.

comments powered by Disqus