1

I have a CSV file generated by a windows system. The file is then moved to linux. The linux environment is NAME="Red Hat Enterprise Linux Server".VERSION="7.3 (Maipo)".ID="rhel".

When I use vi editor, all characters are visible. For example, one line is given :"Sarah--bitte nicht löschen".

But when i cat the file, i get something like "Sarah--bitte nicht l▒schen".

This file is consumed by datastage application and this unicode characters are coming as "?" in datastage. Since cat is not showing the character properly, I believe the issue is at the linux server. Any help is appreciated.

adhithiyan
  • 168
  • 1
  • 9

1 Answers1

0

vi reads the file using encoding according fenc setting and show the content using your locales setting ($LANG env). If fenc is different from LANG, vi can handle the translate.

But cat doesn't handle the translate, it always output the exact byte stream without any convert.

Your terminal will show the output content of both vi and cat using your local PC locale setting.

Zang MingJie
  • 5,164
  • 1
  • 14
  • 27