On Sun, Sep 24, 2023 at 09:47:41AM +0200, Stefan Sperling wrote: > In the UTF-8 locale I can trigger an error message with your program > by sending the latin1 code for a-acute to stdin. I suppose your test > command didn't actually send latin1 to stdin for some reason? > > $ perl -e 'printf "\xe1rbol\n"' | ./a.out > error: Illegal byte sequence >
Right, I can trigger the error with your command, also directly typing the characters in wscons (my keyboard is Spanish), what I was doing in those commands was to copy and paste those latin charactes with my mouse. The strange thing is xterm still showed me the (?) glyphos. Besides, I made a test using the mbstowcs function in my mail patch, and it didn't worked. I'll try again. Thanks Stefan! -- Walter