--- cups-1.2.1/scheduler/job.c.charset	2006-07-14 13:51:26.000000000 +0100
+++ cups-1.2.1/scheduler/job.c	2006-07-14 13:51:36.000000000 +0100
@@ -2992,8 +2992,12 @@
     snprintf(charset, sizeof(charset), "CHARSET=%s", optptr + 8);
   else
   {
-    attr = ippFindAttribute(job->attrs, "attributes-charset",
-	                    IPP_TAG_CHARSET);
+    attr = ippFindAttribute(job->attrs, "document-charset",
+			    IPP_TAG_CHARSET);
+    if (attr == NULL)
+      attr = ippFindAttribute(job->attrs, "attributes-charset",
+			      IPP_TAG_CHARSET);
+
     snprintf(charset, sizeof(charset), "CHARSET=%s",
              attr->values[0].string.text);
   }
