Solved, by finally almost doing what paulsm4 suggested.
The input codepage is, or should be, known: 850. 858 may be supported too, but let's assume 850. I already had to convert a few known characters to HTML, so I know which characters are occuring in the input text.
Instead of a table I'm using a function for the (14) exceptions (and a-z):
case 'ë':
case 'é':
return 'E';
case 'ï':
return 'I';
The original dynamic API (different operating system) or toupper() may be best indeed, albeit one may argue that é should become E or É.
With a limited and known number of exceptions a function, using static values, is an option too.
Finally one could use the other, original operating system to produce code for a static, full table with upto 256 elements. So you don't have to type 512 numbers manually and correctly.
The other, rare, old operating system has an API which returns <= 256 values, using the current codepage:
if (name[i]<=length_table)
sortname[i]=table[i];
else
sortname[i]=name[i];
New code:
sortname[i]=table(i);
Speed is not an issue, but the new function first takes care of more usual characters. It's customized, so I won't poost it here. In theory toupper() could be used if the character is <= 127 there.