Strip Unprintable Characters

Introduction

This channel strips unprintable characters (\128 to \255) out of a string. Some applications have trouble with unprintable characters, removing from the text can be a solution.

If you have any questions please contact us at support@interfaceware.com.

Using the Code [top]

  • Import the Strip Unprintable Characters channel from the Builtin: Iguana Tools repository
  • Experiment with the code to find out how it works
  • Then add the module to your Translator project
  • Copy the require statement from the channel and add it at the top of your script
    Note: This module uses require to return a single function
  • Adapt the code to your own requirements
  • Use the returned Strip() function (or whatever you named it) to remove unprintable characters
  • Interactive scripting help is included for this module

This is the github code for the main module:

How it works [top]

First we create a string BadString which contains some unprintable characters. Then we use Strip() to strip out the unprintable characters.

More information [top]

Tagged: