yyang42 / moulitest

This repository contains tests for several projects done at 42.
127 stars 37 forks source link

Different locale language #50

Open Freccia opened 8 years ago

Freccia commented 8 years ago

I found that on my pc (LC_CTYPE=it_IT.UTF-8) "ls -l" will output date in italian, while ctime(..) will return a string in english (LANG=C). I've tried using setlocale(LC_ALL, NULL) with no result. I don't know If I can have ctime(..) output on locale language. BUT! I changed: char ls_path[MAX_CMD_SIZE] = "/bin/ls"; to: char ls_path[MAX_CMD_SIZE] = "LANG=C /bin/ls"; and I had "ls -l" date output in english! So I can test my ft_ls. I don't know if you wanna change this because maybe there is a hack for ctime(..)