Analyzing Characters in Ubuntu

What tool would allow me to paste in a string of characters and determine if they’re ASCII or UTF-8 characters?

Also I need something that will show me invisible characters such as line breaks (some are \n and some are \r\n, but I need to be able to tell which one it is).

I need tool that can tell me the character encoding of each visible and invisible character pasted into it, or in a file I open.