View file encoding then change encoding.

Hi all!!

I�m using command

file -i myfile.xml

to validate XML file encoding, but it is just saying regular file . I�m expecting / looking an output as UTF8 or ANSI / ASCII

Is there command to display the files encoding?

Thank you!

Most certainly because of the -i argument...
But to give you a better answer we need to know the OS and version you are using...

1 Like

uname -a

SunOS serv364 5.11 11.3 sun4v sparc sun4v