diff --git a/src/nano.c b/src/nano.c
index 17da37b18a82dff115db5173033f4ef28cfc4001..1bb67761a67951d8591beeeddbf9f62d6d266361 100644
--- a/src/nano.c
+++ b/src/nano.c
@@ -30,6 +30,7 @@
 #ifdef ENABLE_UTF8
 #include <langinfo.h>
 #endif
+#include <locale.h>
 #ifdef HAVE_TERMIOS_H
 #include <termios.h>
 #endif