diff -ur zephyr-2.1.20070719.SNAPSHOT/clients/zaway/zaway.c zephyr-patched/clients/zaway/zaway.c
--- zephyr-2.1.20070719.SNAPSHOT/clients/zaway/zaway.c	2009-03-31 18:11:29.000000000 -0400
+++ zephyr-patched/clients/zaway/zaway.c	2009-03-31 17:40:10.000000000 -0400
@@ -15,6 +15,7 @@
 #include <zephyr/zephyr.h>
 #include <pwd.h>
 #include <com_err.h>
+#include <locale.h>
 
 #ifndef lint
 static const char rcsid_zaway_c[] = "$Id: zaway.c 404 2009-02-28 23:30:45Z kcr $";
@@ -56,6 +57,9 @@
 #ifdef _POSIX_VERSION
 	struct sigaction sa;
 #endif
+
+	/* Initialize locale from environment variables */
+	setlocale( LC_ALL, "" );
 	
 	if ((retval = ZInitialize()) != ZERR_NONE) {
 		com_err(argv[0],retval,"while initializing");
@@ -135,7 +139,7 @@
 	}
 
 	for (;;) {
-		if ((retval = ZReceiveNotice(&notice, (struct sockaddr_in *)0)) != ZERR_NONE) {
+		if ((retval = ZReceiveNoticeText(&notice, (struct sockaddr_in *)0)) != ZERR_NONE) {
 			if (retval != ETIMEDOUT)
 				com_err(argv[0],retval,"while receiving notice");
 			continue;
@@ -195,7 +199,7 @@
 		msg[1] = ptr;
 		
 		notice.z_message_len = strlen(notice.z_message)+1;
-		if ((retval = ZSendList(&notice,msg,2,ZNOAUTH)) != ZERR_NONE) {
+		if ((retval = ZSendListText(&notice,msg,2,ZNOAUTH)) != ZERR_NONE) {
 			com_err(argv[0],retval,"while sending notice");
 		}
 		free(ptr);
diff -ur zephyr-2.1.20070719.SNAPSHOT/clients/zwrite/zwrite.c zephyr-patched/clients/zwrite/zwrite.c
--- zephyr-2.1.20070719.SNAPSHOT/clients/zwrite/zwrite.c	2009-03-31 18:11:29.000000000 -0400
+++ zephyr-patched/clients/zwrite/zwrite.c	2009-03-31 17:40:10.000000000 -0400
@@ -15,6 +15,7 @@
 #include <zephyr/zephyr.h>
 #include <netdb.h>
 #include <pwd.h>
+#include <locale.h>
 
 #ifndef lint
 static const char rcsid_zwrite_c[] = "$Id: zwrite.c 404 2009-02-28 23:30:45Z kcr $";
@@ -48,6 +49,9 @@
 
     whoami = argv[0];
 
+    /* Initialize locale from environment variables */
+    setlocale( LC_ALL, "" );
+
     if ((retval = ZInitialize()) != ZERR_NONE) {
 	com_err(whoami, retval, "while initializing");
 	exit(1);
@@ -368,7 +372,7 @@
 		   auth?"authenticated ":"", 
 		   class, inst, 
 		   nrecips?notice->z_recipient:"everyone");
-	if ((retval = ZSendNotice(notice, auth)) != ZERR_NONE) {
+	if ((retval = ZSendNoticeText(notice, auth)) != ZERR_NONE) {
 	    (void) sprintf(bfr, "while sending notice to %s", dest);
 	    com_err(whoami, retval, bfr);
 	    break;
diff -ur zephyr-2.1.20070719.SNAPSHOT/h/zephyr/zephyr.h zephyr-patched/h/zephyr/zephyr.h
--- zephyr-2.1.20070719.SNAPSHOT/h/zephyr/zephyr.h	2009-03-31 18:11:29.000000000 -0400
+++ zephyr-patched/h/zephyr/zephyr.h	2009-03-31 17:40:10.000000000 -0400
@@ -42,7 +42,7 @@
 
 #define ZVERSIONHDR	"ZEPH"
 #define ZVERSIONMAJOR	0
-#define ZVERSIONMINOR	2
+#define ZVERSIONMINOR	3 /* Zephyr messages are now UTF-8. */
 
 #define Z_MAXPKTLEN		1024
 #define Z_MAXHEADERLEN		800
@@ -54,6 +54,10 @@
 #define ZAUTH_YES       	1
 #define ZAUTH_NO        	0
 
+/* Directions for charset conversion */
+#define Z_CONVERT_INCOMING      0
+#define Z_CONVERT_OUTGOING      1
+
 typedef char ZPacket_t[Z_MAXPKTLEN];
 
 /* Packet type */
@@ -154,9 +158,12 @@
 Code_t ZReadAscii16 ZP((char *, int, unsigned short *));
 Code_t ZSendPacket ZP((char*, int, int));
 Code_t ZSendList ZP((ZNotice_t*, char *[], int, Z_AuthProc));
-Code_t ZSrvSendList ZP((ZNotice_t*, char*[], int, Z_AuthProc, Code_t (*)()));
+Code_t ZSendListText ZP((ZNotice_t*, char *[], int, Z_AuthProc));
+Code_t ZSrvSendList ZP((ZNotice_t*, char*[], int, Z_AuthProc, Code_t (*)(),
+			int));
 Code_t ZSendNotice ZP((ZNotice_t *, Z_AuthProc));
-Code_t ZSrvSendNotice ZP((ZNotice_t*, Z_AuthProc, Code_t (*)()));
+Code_t ZSendNoticeText ZP((ZNotice_t *, Z_AuthProc));
+Code_t ZSrvSendNotice ZP((ZNotice_t*, Z_AuthProc, Code_t (*)(), int));
 Code_t ZFormatNotice ZP((ZNotice_t*, char**, int*, Z_AuthProc));
 Code_t ZFormatSmallNotice ZP((ZNotice_t*, ZPacket_t, int*, Z_AuthProc));
 Code_t ZFormatRawNoticeList ZP((ZNotice_t *notice, char *list[], int nitems,
@@ -211,6 +218,8 @@
 Code_t ZCancelSubscriptions ZP((unsigned int port));
 int ZPending ZP((void));
 Code_t ZReceiveNotice ZP((ZNotice_t *notice, struct sockaddr_in *from));
+Code_t ZReceiveNoticeText ZP((ZNotice_t *notice, struct sockaddr_in *from));
+Code_t ZCharacterConvert ZP((char **, int *, ZNotice_t *, int));
 #ifdef Z_DEBUG
 void Z_debug ZP((ZCONST char *, ...));
 #endif
diff -ur zephyr-2.1.20070719.SNAPSHOT/lib/Makefile.in zephyr-patched/lib/Makefile.in
--- zephyr-2.1.20070719.SNAPSHOT/lib/Makefile.in	2009-03-31 18:11:29.000000000 -0400
+++ zephyr-patched/lib/Makefile.in	2009-03-31 17:40:10.000000000 -0400
@@ -39,7 +39,7 @@
 	ZPeekIfNot.lo ZPeekNot.lo ZPeekPkt.lo ZPending.lo ZReadAscii.lo \
 	ZRecvNot.lo ZRecvPkt.lo ZRetSubs.lo ZSendList.lo ZSendNot.lo \
 	ZSendPkt.lo ZSendRaw.lo ZSendRLst.lo ZSetDest.lo ZSetFD.lo ZSetSrv.lo \
-	ZSubs.lo ZVariables.lo ZWait4Not.lo Zinternal.lo
+	ZSubs.lo ZVariables.lo ZWait4Not.lo Zinternal.lo ZCharConv.lo
 
 .SUFFIXES: .lo
 
diff -ur zephyr-2.1.20070719.SNAPSHOT/lib/ZCharConv.c zephyr-patched/lib/ZCharConv.c
--- zephyr-2.1.20070719.SNAPSHOT/lib/ZCharConv.c	2009-03-31 18:12:03.000000000 -0400
+++ zephyr-patched/lib/ZCharConv.c	2009-03-31 17:40:40.000000000 -0400
@@ -0,0 +1,332 @@
+/* This file is part of the Project Athena Zephyr Notification System.
+ * It contains source for ZCharacterConvert function.
+ *
+ *	Created by:	Keith Winstein
+ *
+ *	Copyright (c) 2009 by the Massachusetts Institute of Technology.
+ *	For copying and distribution information, see the file
+ *	"mit-copyright.h". 
+ */
+
+#include <internal.h>
+
+#include <iconv.h>
+#include <langinfo.h>
+#include <locale.h>
+#include <stdio.h>
+#include <string.h>
+#include <stdlib.h>
+#include <errno.h>
+
+Code_t zconvert( char **bufptr, int *len, ZNotice_t *notice,
+		 char *src, char *dst,
+		 size_t prepend_len, char *prepend_str );
+int get_output_length( char *destencoding, char *srcencoding,
+		       char *message, size_t len );
+int do_convert( char *destencoding, char *srcencoding,
+		char *dst, size_t dst_len,
+		char *src, size_t src_len );
+
+Code_t ZCharacterConvert( bufptr, len, notice, direction )
+     char **bufptr;
+     int *len;
+     ZNotice_t *notice;
+     int direction;
+{
+  Code_t retval;
+  char wire[16] = "UTF-8//TRANSLIT";
+  char *local, *src, *dst;
+  char *saved_ctype;
+  int old_zephyr_version = 0;
+
+  /* Step 1: What are the source and destination charsets? */
+  local = alloca( sizeof( nl_langinfo( CODESET ) + 11 ) );
+  strcpy( local, nl_langinfo( CODESET ) );
+  strcat( local, "//TRANSLIT" );
+
+  switch ( direction ) {
+  case Z_CONVERT_INCOMING:
+    src = wire; dst = local;
+    break;
+  case Z_CONVERT_OUTGOING:
+    src = local; dst = wire;
+    break;
+  default:
+    return EINVAL;
+  }
+
+  /* For 0.2 packets, convert silently without reporting invalid char. */
+  if ( !strcmp( notice->z_version, "ZEPH0.2" ) )
+    old_zephyr_version = 1;
+
+  /* Step 2: If our LC_CTYPE is C or POSIX, tell iconv() to assume English.
+     Rationale: iconv() produces better results if it knows what
+     language we're in. E.g., with a destination of ASCII//TRANSLIT,
+     in the C locale, a-with-circumflex becomes a question mark.
+     In en_US en_US.UTF-8, it becomes a normal "a". */
+  saved_ctype = strdup( setlocale( LC_CTYPE, NULL ) );
+  if ( ctype_is_posix() ) {
+    if ( NULL == setlocale( LC_CTYPE, "en_US" ) ) {
+      if ( NULL == setlocale( LC_CTYPE, "en_US.UTF-8" ) ) {
+	/* Give up on finding an English locale */
+	setlocale( LC_CTYPE, saved_ctype );
+      }
+    }
+  }
+
+  /* Step 3: Do the conversion. */
+  retval = zconvert( bufptr, len, notice, src, dst, 0, "" );
+
+  /* Step 4: If conversion fails because of invalid sequence, try
+     again with src encoding = Latin-1. This is a heuristic. */
+
+  /* If this happens in a locale-aware zephyrgram, tell the user. */
+  if ( (retval == EILSEQ) || (retval == EINVAL) ) {
+    char invalid_tag[32];
+
+    if ( old_zephyr_version ) {
+      strcpy( invalid_tag, "" );
+    } else if ( direction == Z_CONVERT_INCOMING ) {
+      strcpy( invalid_tag, "[Invalid incoming character] " );
+    } else {
+      strcpy( invalid_tag, "[Invalid outgoing character] " );
+    }
+
+    retval = zconvert( bufptr, len, notice, "ISO-8859-1", dst,
+		       strlen( invalid_tag ), invalid_tag );
+  }
+
+  setlocale( LC_CTYPE, saved_ctype );
+  free( saved_ctype );
+
+  return retval;
+}
+
+int ctype_is_posix( void )
+{
+  char *current_ctype, *c_ctype;
+  int retval;
+
+  current_ctype = strdup( setlocale( LC_CTYPE, NULL ) );
+
+  /* Temporarily change ctype */
+  c_ctype = strdup( setlocale( LC_CTYPE, "C" ) );
+
+  /* Restore real ctype */
+  setlocale( LC_CTYPE, current_ctype );
+
+  retval = !strcmp( current_ctype, c_ctype );
+
+  free( current_ctype );
+  free( c_ctype );
+
+  return retval;
+}
+
+Code_t zconvert( bufptr, len, notice, src, dst, prepend_len, prepend_str )
+     char **bufptr;
+     int *len;
+     ZNotice_t *notice;
+     char *src;
+     char *dst;
+     size_t prepend_len;
+     char *prepend_str;
+{
+  Code_t retval;
+
+  char *orig_packet;
+  int new_message_length, old_message_length, header_length;
+
+  /* Find out how much space we'll need */
+  header_length = notice->z_message - notice->z_packet;
+  old_message_length = notice->z_message_len;
+  new_message_length = get_output_length( dst, src,
+					  notice->z_message,
+					  notice->z_message_len );
+
+  if ( new_message_length < 0 )
+    return errno;
+
+  new_message_length += prepend_len;
+
+  /* Store original packet elsewhere */
+  if ( notice->z_packet != *bufptr )
+    return EINVAL;
+
+  orig_packet = (char *) malloc( *len );
+
+  if ( orig_packet == NULL )
+    return ENOMEM;
+
+  memcpy( orig_packet, *bufptr, *len );
+
+  /* Make a new buffer */
+  *bufptr = (char *) realloc( *bufptr, header_length + new_message_length );
+  if ( NULL == *bufptr ) {
+    free( orig_packet );
+    return ENOMEM;
+  }
+
+  /* Patch up part of the notice */
+  notice->z_packet = *bufptr;
+  notice->z_message = *bufptr + header_length;
+  notice->z_message_len = new_message_length;
+  *len = header_length + new_message_length;
+
+  strncpy( notice->z_message, prepend_str, prepend_len );
+
+  /* Convert to user locale */
+  if ( do_convert( dst, src,
+		   notice->z_message + prepend_len,
+		   new_message_length - prepend_len,
+		   orig_packet + header_length, old_message_length ) < 0 ) {
+    free( orig_packet );
+    return EINVAL;
+  }
+
+  free( orig_packet );
+
+  /* Fix rest of notice fields */
+  return ZParseNotice( *bufptr, *len, notice );
+}
+
+int get_output_length( char *destencoding, char *srcencoding,
+		       char *message, size_t len )
+{
+  int the_length = 0;
+  int saveerrno;
+  iconv_t converter;
+  size_t inbytesleft, outlen = 1, outbytesleft;
+  /* Better length would be 32768, but use 1 here to stress */
+
+  char *outbuf;
+  char *outptr, *inptr;
+
+  converter = iconv_open( destencoding, srcencoding );
+  if ( converter == (iconv_t) -1 ) {
+    perror( "iconv_open" );
+    return -1;
+  }
+
+  while( 1 ) {
+    /* Attempt conversion with increasingly-larger buffers */
+    /* This shouldn't be necessary, but GNU iconv() did not handle
+       E2BIG according to POSIX until 2009 CVS bugfix. */
+
+    size_t ret;
+
+    outbuf = (char *) malloc( outlen );
+    if ( outbuf == NULL ) {
+      perror( "malloc" );
+      if ( iconv_close( converter ) < 0 ) {
+	perror( "iconv_close" );
+      }
+      return -1;
+    }
+
+    inptr = message;
+    outptr = outbuf;
+
+    inbytesleft = len;
+    outbytesleft = outlen;
+
+    ret = iconv( converter, &inptr, &inbytesleft, &outptr, &outbytesleft );
+
+    if ( ret == -1 ) {
+      if ( errno == EILSEQ ) {
+	//        fprintf( stderr, "Invalid multibyte sequence in input.\n" );
+	goto badstate;
+      } else if ( errno == EINVAL ) {
+	//        fprintf( stderr, "Incomplete input.\n" );
+	goto badstate;
+      } else if ( errno == E2BIG ) {
+	/* Need a bigger buffer */
+	outlen *= 2;
+	free( outbuf );
+      } else {
+        perror( "iconv" );
+	goto badstate;
+      }
+    } else {
+      /* Completed conversion */
+      break;
+    }
+  }
+
+  /* Flush output buffer */
+  size_t additional = outptr - outbuf;
+  the_length += additional;
+
+  free( outbuf );
+
+  if ( iconv_close( converter ) < 0 ) {
+    perror( "iconv_close" );
+  }
+
+  return the_length;
+
+ badstate:
+  saveerrno = errno;
+
+  free( outbuf );
+
+  if ( iconv_close( converter ) < 0 ) {
+    perror( "iconv_close" );
+  }
+  
+  errno = saveerrno;
+  return -1;
+}
+
+int do_convert( char *destencoding, char *srcencoding,
+		char *dst, size_t dst_len,
+		char *src, size_t src_len )
+{
+  iconv_t converter;
+  Code_t retval;
+
+  converter = iconv_open( destencoding, srcencoding );
+  if ( converter == (iconv_t) -1 ) {
+    perror( "iconv_open" );
+    return -1;
+  }
+
+  if ( iconv( converter, &src, &src_len, &dst, &dst_len ) == -1 ) {
+    if ( errno == EILSEQ ) {
+      fprintf( stderr, "BUG: Invalid multibyte sequence in input!\n" );
+      goto badstate;
+    } else if ( errno == EINVAL ) {
+      fprintf( stderr, "BUG: Incomplete input!\n" );
+      goto badstate;
+    } else if ( errno == E2BIG ) {
+      fprintf( stderr, "BUG: Ran out of room!\n" );
+      goto badstate;
+    } else {
+      perror( "iconv" );
+      goto badstate;
+    }
+  }
+
+  if ( dst_len != 0 ) {
+    fprintf( stderr, "BUG: Ended up with dst_len = %d\n", dst_len );
+    goto badstate;
+  }
+
+  if ( src_len != 0 ) {
+    fprintf( stderr, "BUG: Ended up with src_len = %d\n", dst_len );
+    goto badstate;
+  }
+
+  if ( iconv_close( converter ) < 0 ) {
+    perror( "iconv_close" );
+  }
+
+  return 0;
+
+ badstate:
+  if ( iconv_close( converter ) < 0 ) {
+    perror( "iconv_close" );
+  }
+  
+  return -1;
+}
diff -ur zephyr-2.1.20070719.SNAPSHOT/lib/ZRecvNot.c zephyr-patched/lib/ZRecvNot.c
--- zephyr-2.1.20070719.SNAPSHOT/lib/ZRecvNot.c	2009-03-31 18:11:29.000000000 -0400
+++ zephyr-patched/lib/ZRecvNot.c	2009-03-31 17:40:10.000000000 -0400
@@ -16,9 +16,26 @@
 
 #include <internal.h>
 
-Code_t ZReceiveNotice(notice, from)
-    ZNotice_t *notice;
-    struct sockaddr_in *from;
+Code_t Int_ReceiveNotice(notice,from,text);
+
+Code_t ZReceiveNotice(notice,from)
+     ZNotice_t *notice;
+     struct sockaddr_in *from;
+{
+  return Int_ReceiveNotice( notice, from, 0 );
+}
+
+Code_t ZReceiveNoticeText(notice,from)
+     ZNotice_t *notice;
+     struct sockaddr_in *from;
+{
+  return Int_ReceiveNotice( notice, from, 1 );
+}
+
+Code_t Int_ReceiveNotice(notice,from,text)
+     ZNotice_t *notice;
+     struct sockaddr_in *from;
+     int text;
 {
     char *buffer;
     struct _Z_InputQ *nextq;
@@ -46,5 +63,13 @@
     if ((retval = ZParseNotice(buffer, len, notice)) != ZERR_NONE)
 	return (retval);
     notice->z_checked_auth = auth;
+
+    if ( text ) {
+      if ((retval = ZCharacterConvert( &buffer, &len, notice,
+				       Z_CONVERT_INCOMING )) != ZERR_NONE)
+        return (retval);
+      notice->z_checked_auth = auth;
+    }
+
     return ZERR_NONE;
 }
diff -ur zephyr-2.1.20070719.SNAPSHOT/lib/ZSendList.c zephyr-patched/lib/ZSendList.c
--- zephyr-2.1.20070719.SNAPSHOT/lib/ZSendList.c	2009-03-31 18:11:29.000000000 -0400
+++ zephyr-patched/lib/ZSendList.c	2009-03-31 17:40:10.000000000 -0400
@@ -22,15 +22,25 @@
     int nitems;
     Z_AuthProc cert_routine;
 {
-    return(ZSrvSendList(notice, list, nitems, cert_routine, Z_XmitFragment));
+  return(ZSrvSendList(notice, list, nitems, cert_routine, Z_XmitFragment, 0));
 }
 
-Code_t ZSrvSendList(notice, list, nitems, cert_routine, send_routine)
+Code_t ZSendListText(notice, list, nitems, cert_routine)
+    ZNotice_t *notice;
+    char *list[];
+    int nitems;
+    Z_AuthProc cert_routine;
+{
+  return(ZSrvSendList(notice, list, nitems, cert_routine, Z_XmitFragment, 1));
+}
+
+Code_t ZSrvSendList(notice, list, nitems, cert_routine, send_routine, text)
     ZNotice_t *notice;
     char *list[];
     int nitems;
     Z_AuthProc cert_routine;
     Code_t (*send_routine)();
+    int text;
 {
     Code_t retval;
     ZNotice_t newnotice;
@@ -44,6 +54,12 @@
     if ((retval = ZParseNotice(buffer, len, &newnotice)) != ZERR_NONE)
 	return (retval);
     
+    if ( text ) {
+      if ((retval = ZCharacterConvert( &buffer, &len, &newnotice,
+				       Z_CONVERT_OUTGOING )) != ZERR_NONE)
+	return (retval);
+    }
+
     retval = Z_SendFragmentedNotice(&newnotice, len, cert_routine,
 				    send_routine);
 
diff -ur zephyr-2.1.20070719.SNAPSHOT/lib/ZSendNot.c zephyr-patched/lib/ZSendNot.c
--- zephyr-2.1.20070719.SNAPSHOT/lib/ZSendNot.c	2009-03-31 18:11:29.000000000 -0400
+++ zephyr-patched/lib/ZSendNot.c	2009-03-31 17:40:10.000000000 -0400
@@ -20,13 +20,21 @@
     ZNotice_t *notice;
     Z_AuthProc cert_routine;
 {
-    return(ZSrvSendNotice(notice, cert_routine, Z_XmitFragment));
+  return(ZSrvSendNotice(notice, cert_routine, Z_XmitFragment, 0));
 }
 
-Code_t ZSrvSendNotice(notice, cert_routine, send_routine)
+Code_t ZSendNoticeText(notice, cert_routine)
+    ZNotice_t *notice;
+    Z_AuthProc cert_routine;
+{
+  return(ZSrvSendNotice(notice, cert_routine, Z_XmitFragment, 1));
+}
+
+Code_t ZSrvSendNotice(notice, cert_routine, send_routine, text)
     ZNotice_t *notice;
     Z_AuthProc cert_routine;
     Code_t (*send_routine)();
+    int text;
 {    
     Code_t retval;
     ZNotice_t newnotice;
@@ -39,7 +47,13 @@
 
     if ((retval = ZParseNotice(buffer, len, &newnotice)) != ZERR_NONE)
 	return (retval);
-    
+
+    if ( text ) {
+      if ((retval = ZCharacterConvert( &buffer, &len, &newnotice,
+				       Z_CONVERT_OUTGOING )) != ZERR_NONE)
+	return (retval);
+    }    
+
     retval = Z_SendFragmentedNotice(&newnotice, len, cert_routine,
 				    send_routine);
 
diff -ur zephyr-2.1.20070719.SNAPSHOT/zwgc/main.c zephyr-patched/zwgc/main.c
--- zephyr-2.1.20070719.SNAPSHOT/zwgc/main.c	2009-03-31 18:11:29.000000000 -0400
+++ zephyr-patched/zwgc/main.c	2009-03-31 17:40:10.000000000 -0400
@@ -25,6 +25,7 @@
 #include <sys/resource.h>
 #include <zephyr/mit-copyright.h>
 #include <zephyr/zephyr.h>
+#include <locale.h>
 
 #include "new_memory.h"
 #include "zwgc.h"
@@ -277,6 +278,9 @@
     }
 #endif
 
+    /* Initialize locale from environment variables */
+    setlocale( LC_ALL, "" );
+
     /*
      * Initialize various subsystems in proper order:
      */
diff -ur zephyr-2.1.20070719.SNAPSHOT/zwgc/X_driver.c zephyr-patched/zwgc/X_driver.c
--- zephyr-2.1.20070719.SNAPSHOT/zwgc/X_driver.c	2009-03-31 18:11:29.000000000 -0400
+++ zephyr-patched/zwgc/X_driver.c	2009-03-31 17:40:10.000000000 -0400
@@ -38,6 +38,8 @@
 #include "xselect.h"
 #include "unsigned_long_dictionary.h"
 
+#include <locale.h>
+
 char *app_instance;
 
 /*
@@ -375,6 +377,11 @@
     
     mux_add_input_source(ConnectionNumber(dpy), x_get_input, dpy);
 
+    /* Use Latin-1 or C charset, since X driver can't handle UTF-8 yet */
+    if ( NULL == setlocale( LC_CTYPE, "en_US" ) ) {
+      setlocale( LC_CTYPE, "C" );
+    }
+
     return(0);
 }
 
diff -ur zephyr-2.1.20070719.SNAPSHOT/zwgc/zephyr.c zephyr-patched/zwgc/zephyr.c
--- zephyr-2.1.20070719.SNAPSHOT/zwgc/zephyr.c	2009-03-31 18:11:29.000000000 -0400
+++ zephyr-patched/zwgc/zephyr.c	2009-03-31 17:40:10.000000000 -0400
@@ -112,7 +112,7 @@
 
 	notice = malloc(sizeof(ZNotice_t));
 
-	TRAP( ZReceiveNotice(notice, &from), "while getting zephyr notice" );
+	TRAP( ZReceiveNoticeText(notice, &from), "while getting zephyr notice" );
 	if (!error_code) {
 	    notice->z_auth = ZCheckAuthentication(notice, &from);
 	    notice_handler(notice);
