Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

"hidden" characters in .txt files

Status
Not open for further replies.

Graziella

Programmer
Joined
Jul 8, 2004
Messages
38
Location
AT
Hi,

I have two questions:
1. how does one check to see the encoding of a .txt file when working in a Unix environment ?

2. how does one check to see if there are characters that are not visible through the text editor one is using (pico, vi, emacs) but can create problems with regex when processing the file ?

Thank you,

Grazia
 
one way would be "cat -v file
 
od -c file

vlad
+----------------------------+
| #include<disclaimer.h> |
+----------------------------+
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top