Sample Header Ad - 728x90

Unable to change file encoding to utf-8

0 votes
1 answer
1452 views
I modified a UTF-8 encoded xml file using vi editor and saved it. I'm on Redhat Linux 7.9 I checked the file encoding after the changes and found it to be us-ascii file --mime-encoding tmpfiles/08/config/jdbc/jdbc.xml tmpfiles/08/config/jdbc/jdbc.xml: us-ascii I decided to change the encoding back to UTF-8 using the below command: iconv -f us-ascii -t UTF-8 tmpfiles/08/config/jdbc/jdbc.xml >tmpfiles/08/config/jdbc/jdbc.xmlenc echo $? 0 However, the encoding for the new file jdbc.xmlenc did not change to UTF-8 and remained unchanged. See the output below: file --mime-encoding tmpfiles/08/config/jdbc/jdbc.xmlenc tmpfiles/08/config/jdbc/jdbc.xmlenc: us-ascii Can you please suggest how can i change the file encoding to UTF-8?
Asked by Ashar (527 rep)
Mar 29, 2022, 11:34 AM
Last activity: Mar 29, 2022, 12:24 PM