Closed MikeFultonDev closed 1 year ago
For some reason, if I look at the 'vim' man page file, it is being stored in IBM-1047 (which is not a good thing)
t IBM-1047 T=on /home/fultonm/zopen/boot/vim/share/man/fr.UTF-8/man1/vim.1
(this is fixed with the latest vim
and the files are now ISO8859-1, but it doesn't change the problem)
Also, I see that it is converting from UTF-8 to ISO-8859-1 as part of display, e.g. iconv -c -f UTF-8 -t ISO-8859-1//TRANSLIT
(run with man -d ...). This is probably because man-db is being built wrong - we want to keep the file in UTF-8 to retain the information until display.
For example, If I create a text file and tag it as ISO8859-1 with one line:
Claire Côté
then this file will be editable and 'cat' will work correctly on it to display on the terminal. I noticed 'less' does not display the text correctly, but it DOES if I
export LESSCHARSET=utf-8
first.
I have reproduced this problem on my Mac in that if I 'cat' a French ASCII file, it doesn't look right, but if I 'cat' a French UTF-8 file, it does look right, and furthermore, both look right in vim. Some googling got me to this: https://unix.stackexchange.com/questions/78776/characters-encodings-supported-by-more-cat-and-less
Good News! If I change my terminal setting (in my case, I change the terminal to 'western-ascii') then I am able to get vim to display right
So - I will close this as 'user error' 😁 ... As it turns out, 'french' internally uses ISO8859-1 internally in man even though the man page may be UTF-8. This appears to be 'working as designed'.
Before I close this, I will update the FAQ...
Here is the PR for the docs update: https://github.com/ZOSOpenTools/meta/pull/259
I don't know if this is a '1047' problem or something else but if I specify:
man --locale=fr vim
then I get:
VIM(1) General Commands Manual VIM(1)
NOM vim - Vi IMproved, �diteur de texte pour programmeurs
SYNOPSIS vim [options] [fichier ...] vim [options] - vim [options] -t marqueur vim [options] -q [fichiererreurs]
DESCRIPTION Vim est un �diteur de texte proposant une compatibilit� ascendante avec Vi. Il permet d'�diter n'importe quel type de texte brut. Il est particuli�rement adapt� pour l'�dition des programmes.