# This patches fixes the behaviour of the rot13ing of articles.
# Umlauts are no longer destroyed when roting an article.
# 
# 6.7.2007 Thomas Wiegner (wiegner(at)gmx.de)
#
--- src/art.c	2007-07-06 20:00:26.000000000 +0200
+++ src/art.c	2007-07-06 20:11:11.000000000 +0200
@@ -8215,16 +8215,23 @@
 static void write_rot13 (unsigned char *buf, int color, int use_emph) /*{{{*/
 {
    unsigned char ch;
+   unsigned char *buf_rot13;
 
-   (void) color;
-   (void) use_emph;
    init_rot13();
-   
-   while ((ch = *buf++) != 0)
+   buf_rot13 = slrn_safe_strmalloc (buf);
+
+   decode_rot13(buf_rot13);
+   if (use_emph)
      {
-	ch = Rot13buf[ch];
-	slrn_write_nbytes ((char *) &ch, 1);
+#if SLRN_HAS_EMPHASIZED_TEXT
+        smg_write_emphasized_text (buf_rot13, color);
+        slrn_free(buf_rot13);
+        return;
+#endif
      }
+   smg_write_string (buf_rot13);
+   slrn_free(buf_rot13);
+
 }
 /*}}}*/
 
@@ -8906,7 +8913,7 @@
 
    if (Do_Rot13 && use_rot13)
      {
-	write_rot13 ((unsigned char *) lbuf, use_emph_mask, color);
+	write_rot13 ((unsigned char *) lbuf, color, use_emph_mask);
 	return;
      }
    
--- src/version.c      2007-07-07 13:14:58.000000000 +0200
+++ src/version.c      2007-07-07 13:13:27.000000000 +0200
@@ -83,2 +83,3 @@
 static char *included_patches[] =
 {
+ "rot13_umlaut",

