From 5ca0af3ac93b7f0aa2dcca6fede0a5f224cecf1e Mon Sep 17 00:00:00 2001 From: mmcgrath Date: Thu, 5 Jul 2007 16:54:39 +0000 Subject: [PATCH] [project @ 2007-01-03 11:16:44 by twaugh] 2007-01-03 Tim Waugh * Makefile: Version 1.9.17. Original author: twaugh Date: 2007-01-03 11:16:44+00:00 git-svn-id: svn+ssh://svn.fedorahosted.org/svn/pycups/pycups@164 e7545f15-59ab-4934-8816-61942c173d0f --- ChangeLog | 9 +++++++++ Makefile | 2 +- cupsppd.c | 16 ++++++++-------- 3 files changed, 18 insertions(+), 9 deletions(-) diff --git a/ChangeLog b/ChangeLog index 6e8fa17..3c9e704 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,12 @@ +2007-01-03 Tim Waugh + + * Makefile: Version 1.9.17. + +2007-01-03 Tim Waugh + + * cupsppd.c (ppd_encoding_is_utf8): Handle there being no known + encoding for the PPD file (bug #220136). + 2006-12-15 Tim Waugh * cupsppd.c (PPD_localize): New method. diff --git a/Makefile b/Makefile index b1c1c09..5f48c81 100644 --- a/Makefile +++ b/Makefile @@ -1,5 +1,5 @@ NAME=pycups -VERSION=1.9.16 +VERSION=1.9.17 TAG=`echo $(NAME)-$(VERSION) | tr . _` PYTHONVERS = python2.4 diff --git a/cupsppd.c b/cupsppd.c index 307c812..8e02dd2 100644 --- a/cupsppd.c +++ b/cupsppd.c @@ -1,6 +1,6 @@ /* * cups - Python bindings for CUPS - * Copyright (C) 2002, 2005, 2006 Tim Waugh + * Copyright (C) 2002, 2005, 2006, 2007 Tim Waugh * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -64,20 +64,20 @@ ppd_encoding_is_utf8 (PPD *ppd) return 0; lang_encoding = ppd->ppd->lang_encoding; - if (!strcasecmp (lang_encoding, "UTF-8")) + if (lang_encoding && !strcasecmp (lang_encoding, "UTF-8")) return 1; - if (!strcasecmp (lang_encoding, "ISOLatin1")) + if (lang_encoding && !strcasecmp (lang_encoding, "ISOLatin1")) from_encoding = "ISO-8859-1"; - else if (!strcasecmp (lang_encoding, "ISOLatin2")) + else if (lang_encoding && !strcasecmp (lang_encoding, "ISOLatin2")) from_encoding = "ISO-8859-2"; - else if (!strcasecmp (lang_encoding, "ISOLatin5")) + else if (lang_encoding && !strcasecmp (lang_encoding, "ISOLatin5")) from_encoding = "ISO-8859-5"; - else if (!strcasecmp (lang_encoding, "JIS83-RKSJ")) + else if (lang_encoding && !strcasecmp (lang_encoding, "JIS83-RKSJ")) from_encoding = "SHIFT-JIS"; - else if (!strcasecmp (lang_encoding, "MacStandard")) + else if (lang_encoding && !strcasecmp (lang_encoding, "MacStandard")) from_encoding = "MACINTOSH"; - else if (!strcasecmp (lang_encoding, "WindowsANSI")) + else if (lang_encoding && !strcasecmp (lang_encoding, "WindowsANSI")) from_encoding = "WINDOWS-1252"; else // Guess