FG

How can I find non-ASCII characters in text files?

Fresh3 days ago
Mar 15, 202613246 views
Confidence Score0%
0%

Problem

Is there a tool that can scan a small text file and look for any character not in the simple ASCII character set? A simple Java or Groovy script would also do.

Unverified for your environment

Select your OS to check compatibility.

1 Fix

Canonical Fix
Unverified Fix
New Fix – Awaiting Verification

Fix for: How can I find non-ASCII characters in text files?

Low Risk

Well, it's still here after an hour, so I may as well answer it. Here's a simple filter that prints only non-ASCII characters from its input, and gives exit code 0 if there weren't any and 1 if there were. Reads from standard input only.

Awaiting Verification

Be the first to verify this fix

Sign in to verify this fix

Environment