Greetings !!
I tried this little code to demonstrate the internationalization needs to my students, a program that I used since 2011.
#include <stdio.h>
#include <stdlib.h>
#include <wchar.h>
#include <locale.h>
int main(int argc,char *argv])
{
setlocale(LC_ALL,"fr_BE.UTF-8");
wprintf(L"Vérif locale... %p
",argv[1]);
exit(0);
}
I was surprized that the results obtained wasn’t (null) as expected but either (nil) :{
I can say last year the result during the same lecture was “(null)” ^^
Does the things have changed with the locale or glibc representing a null pointed string ?
My workstation has those locales:
rasalgethi:/librairies/cssm_wide/tests/getnchar # locale
LANG=POSIX
LC_CTYPE=en_US.UTF-8
LC_NUMERIC="POSIX"
LC_TIME="POSIX"
LC_COLLATE="POSIX"
LC_MONETARY="POSIX"
LC_MESSAGES="POSIX"
LC_PAPER="POSIX"
LC_NAME="POSIX"
LC_ADDRESS="POSIX"
LC_TELEPHONE="POSIX"
LC_MEASUREMENT="POSIX"
LC_IDENTIFICATION="POSIX"
LC_ALL=
…I observed this behaviour on all my Linux systems, at home as at school. Last year we moved to 15.1 and I remember we got “(null)” in september/october 2019 ^^
Do I change my notes and screen shots or there is something I’m wrong with ?