# Handle special chars * [Detect encoding](#detect-encoding) * [Special chars](#special-chars) * [Re-encode](#re-encode) --- ## Detect encoding Text file encoding can be identified using, for example, `file -b ` or in vim with `:set fileencoding`. Here's an example of encoding that will fully work with dotdrop: ```bash $ file -b UTF-8 Unicode text, with escape sequences ``` and another that will mislead the `compare` command and return false/inaccurate results: ```bash $ file -b ISO-8859 text, with escape sequences ``` ## Special chars ### CRLF The use of dotfiles with DOS/Windows line endings (CRLF, `\r\n`) will result in the comparison (`compare`) returning a difference where there is none. This is due to Jinja2 stripping CRLF. One solution is to use `dos2unix` to re-format the dotfiles before adding them to dotdrop. See . ### Non-Unicode chars Jinja2 is not able to process non-Unicode chars (). This means that dotfiles using non-Unicode chars can still be fully managed by dotdrop; however, when comparing the local file with the one stored in dotdrop, `compare` will return a difference even if there is none. Either replace the non-Unicode chars (see below [Re-encode](#re-encode)) or accept the fact the comparison shows a difference while there's none. See . ## Re-encode To change an existing file's encoding, you can use `recode UTF-8 ` (see [recode](https://linux.die.net/man/1/recode)) or in vim `:set fileencoding=utf-8`.