There are several issues that you have to make sure that your program prints Hólà:
1.- The file that contains the Hólà string must be recorded with a coding compatible with the locale with which you are going to execute the program. I'm going to do it with the locale es_ES.UTF-8
Therefore the file must be encoded in UTF-8.
If you do a hexdump of a file with the string Hólà and nothing else, neither returns of car or anything, you must obtain:
jose@cpu:~/t$ hexdump -C fich.txt
00000000 48 c3 b3 6c c3 a0 |H..l..|
00000006
Where:
48 Unicode U+0048 LATIN CAPITAL LETTER H (Mayúscula latina H)
c3b3 Unicode U+00F3 LATIN SMALL LETTER O WITH ACUTE (Minúscula latina O
con tilde cerrada)
6c Unicode U+006C LATIN SMALL LETTER L (Minúscula latina L)
c3a0 Unicode U+00E0 LATIN SMALL LETTER A WITH GRAVE (Minúscula latina A
con tilde abierta)
You can check the unicode codes in link
2.- Your program must load the locale set in the environment variables. This you do well.
setlocale( LC_ALL, "");
3.- The locale must be available in your system.
For example, in an Ubuntu system you have to edit the file /etc/locale.gen
And make sure it contains this line:
en_US.UTF-8 UTF-8
If it did not contain it or contained it commented (starting with #) then you have to execute locale-gen
after editing it.
4.- The user must establish the locale. This is what you had wrong.
Using bash would be like this:
jose@cpu:~/t$ LC_ALL=es_ES.utf8
jose@coy:~/t$ ./programa
Hólà