--- main.c.orig	Sun Jan 22 01:21:08 1995
+++ main.c	Tue Dec  7 13:57:42 1999
@@ -19,4 +19,8 @@
 #include <stdio.h>
 #include <fcntl.h>
+#ifdef __FreeBSD__
+#include <locale.h>
+#include <ctype.h>
+#endif
 #include "config.h"
 #include "w.h"
@@ -188,4 +192,18 @@
 #endif 
 
+#ifdef __FreeBSD__
+ setlocale(LC_ALL, "");
+ for(c=0;c<256;c++)
+  { int a=0;
+    if(iscntrl(c))
+     a|=UNDERLINE;
+    if((c&0x80)&&!isprint(c))
+     a|=INVERSE;
+    xlata[c]=a;
+    if(isprint(c))
+     xlatc[c]=c;
+  }
+#endif
+
  if(s=getenv("LINES")) sscanf(s,"%d",&lines);
  if(s=getenv("COLUMNS")) sscanf(s,"%d",&columns);
@@ -366,5 +384,5 @@
  if(help) helpon(maint);
  if(!nonotice)
-  msgnw(lastw(maint)->object,"\\i** Joe's Own Editor v2.8 ** Copyright (C) 1995 Joseph H. Allen **\\i");
+  msgnw(lastw(maint)->object,"\\i** Joe's Own Editor v2.8l ** Copyright (C) 1995 Joseph H. Allen **\\i");
  edloop(0);
  vclose(vmem);
