Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Currently Datical supports the encodings listed in the Supported Encodings section of this page. This article includes instructions to help identify special characters in a sql script.

...

  1. Open the file in Notepad++.

  2. In the lower right of the screen you can find the file encoding.

  3. To find non UTF-8 in Notepad++ go to Encoding → Encode in UTF-8. The setting should highlight the special characters.

  4. In the screenshot above the xA0 represents non UTF-8 characters that will throw errors when the script is passed to sqlcmd, sqlplus, and other utilities. Those characters will need to be deleted from the feed.

  5. Additional if you want Notepad++ to move the cursor to non UTF-8 characters for easier removal, go to Search → Find characters in range…

    1. Select Non-ASCII Characters (128-255)

    2. Use ‘Find’ button to move the cursor to the special characters.

Commands for removing special characters

  1. There are also a variety of programmatic methods for removing special characters. For example, you can use git bash to remove special characters with the tr command (from https://alvinalexander.com/blog/post/linux-unix/how-remove-non-printable-ascii-characters-file-unix/).

Please note, you may need to manipulate the command below if you wish to keep certain special characters as this will strip out ALL special characters.

...

 It would need to be used with caution:

Code Block
 tr -cd '\11\12\15\40-\176' < file-with-binary-chars > clean-file