Skip to content

Commit

Permalink
[project @ 2007-01-03 11:16:44 by twaugh]
Browse files Browse the repository at this point in the history
2007-01-03  Tim Waugh  <twaugh@redhat.com>

        * 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
  • Loading branch information
mmcgrath committed Jul 5, 2007
1 parent 8cf21dc commit 5ca0af3
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 9 deletions.
9 changes: 9 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
2007-01-03 Tim Waugh <twaugh@redhat.com>

* Makefile: Version 1.9.17.

2007-01-03 Tim Waugh <twaugh@redhat.com>

* cupsppd.c (ppd_encoding_is_utf8): Handle there being no known
encoding for the PPD file (bug #220136).

2006-12-15 Tim Waugh <twaugh@redhat.com>

* cupsppd.c (PPD_localize): New method.
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
NAME=pycups
VERSION=1.9.16
VERSION=1.9.17
TAG=`echo $(NAME)-$(VERSION) | tr . _`

PYTHONVERS = python2.4
Expand Down
16 changes: 8 additions & 8 deletions cupsppd.c
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
* cups - Python bindings for CUPS
* Copyright (C) 2002, 2005, 2006 Tim Waugh <twaugh@redhat.com>
* Copyright (C) 2002, 2005, 2006, 2007 Tim Waugh <twaugh@redhat.com>
*
* 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
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 5ca0af3

Please sign in to comment.