Ondřej Plátek Archive
PhD candidate@UFAL, Prague. LLM & TTS evaluation. Engineer. Researcher. Speaker. Father.

Pasting Czech in Vim -> Strange characters? Solved

I used to have a problem that copy pasting text from Czech web page in my browser into Vim did not worked. The diacritic was completely broken. I ignored the problem, because I thought the problem is caused by Vim, which wrongly detected encoding. However, Yesterday I realized that it is not the problem, since my file encoding did not changed. After short search I found the right answer. Set up your locale for Czech! That's easy. Edit your bashrc and source it again an you are done! Paste this into your bashrc

export LANG=cs_CZ.UTF-8
export LC_ALL="$LANG"
export LANGUAGE="$LANG"
and run

$source ~/.bashrc
That's it! Česky: Pro nastavení Vimu, aby jste mohli vkládat české texty, přidejte první tři exporty do ~/.bashrc a proveďte source bashrc.