# Change file encoding with linux

To get current encoding:

```bash
file -i {filename}
```

To convert it:

```bash
iconv -f {sourceEncoding} -t {targetEncoding} {filename}
```

Example:

```bash
iconv -f ISO_8859-1 -t UTF-8 filename.txt
```