Hacker News new | ask | show | jobs
by spc476 1063 days ago
C programs start out in the "C" locale, so just using fgetwc() won't work out of the box (or won't do what you expect it to do). You'll need to call setlocale("") to get the expected behavior.