 private extension NSButton {
     var isOn: Bool { self.state == .on }
 }
+
+private extension String {
+    var hasControlCharacters: Bool {
+        hasRegexp(pattern: "\\p{Cntrl}")
+    }
+
+    var stringByRemovingControlCharacters: String {
+        stringByReplacingRegexp(pattern: "\\p{Cntrl}", with: "")
+    }
+}
 // swiftlint:enable file_length


    @IBAction func comment(_ sender: AnyObject) {
        let comment = commentTextField.stringValue

        if comment.isEmpty {
            scrollView.scrollToBottom()

            commentHistory.append(comment)
            commentHistoryIndex = commentHistory.count
        }
    }

    private func logComment(_ comment: String) {
        logSystemMessageToTable("comment: [\(comment)]")
        logSystemMessageToTable("comment.clean: [\(comment.stringByRemovingControlCharacters)]")
        logSystemMessageToTable("hasControlCharacters: [\(comment.hasControlCharacters)]")
        logSystemMessageToTable("hasX1c: [\(comment.hasRegexp(pattern: "\\x1c"))]")

        log.debug("[\(comment)] -> [\(comment.stringByRemovingControlCharacters)]")
    }

    @IBAction func speakButtonStateChanged(_ sender: Any) {
