[tz] [PATCH] Don't abuse "`" to mean open quote.

Paul Eggert eggert at CS.UCLA.EDU
Sun Jun 15 20:27:37 UTC 2014


This was appropriate before Unicode, where "`" and "'" often balanced
in visual output, but that's been obsolete for a while.
Overall, single-quote 'like this' instead of `like this', and
double-quote "like this" or (in typeset output) “like this”
instead of ``like this''.  While we're at it, fix some glitches
with hyphens versus minus versus en dash versus em dash.
* Makefile ($(MANTXTS)): Use UTF-8 locale to produce *.txt output.
* checktab.awk, tzselect.ksh:
Quote 'like this' in diagnostics, instead of `like this'.
* date.1, newctime.3, newtzset.3, time2posix.3, zic.8 (q, lq, rq):
New macros.  Use them for better double-quoting in output.
* workman.sh: Tell Perl that its stdin and stdout are UTF-8.
* NEWS: Document this.
---
 Makefile      | 10 +++++-----
 NEWS          | 14 +++++++-------
 africa        | 18 +++++++++---------
 asia          | 20 ++++++++++----------
 australasia   | 50 +++++++++++++++++++++++++-------------------------
 checktab.awk  | 14 +++++++-------
 date.1        | 30 ++++++++++++++++++++++--------
 date.c        |  4 ++--
 etcetera      |  2 +-
 iso3166.tab   |  2 +-
 localtime.c   |  6 +++---
 newctime.3    | 38 +++++++++++++++++++++++++++-----------
 newstrftime.3 |  2 +-
 newtzset.3    | 45 +++++++++++++++++++++++++++------------------
 private.h     |  4 ++--
 strftime.c    |  6 +++---
 time2posix.3  | 15 +++++++++++++--
 tzselect.ksh  |  4 ++--
 workman.sh    |  2 ++
 zdump.c       |  2 +-
 zic.8         | 34 +++++++++++++++++-----------------
 zic.c         |  4 ++--
 22 files changed, 189 insertions(+), 137 deletions(-)

diff --git a/Makefile b/Makefile
index 17df149..0dcbe8e 100644
--- a/Makefile
+++ b/Makefile
@@ -96,14 +96,14 @@ REDO=		posix_right
 YEARISTYPE=	./yearistype
 
 # Non-default libraries needed to link.
-# Add -lintl if you want to use `gettext' on Solaris.
+# Add -lintl if you want to use 'gettext' on Solaris.
 LDLIBS=
 
 # Add the following to the end of the "CFLAGS=" line as needed.
 #  -DBIG_BANG=-9999999LL if the Big Bang occurred at time -9999999 (see zic.c)
-#  -DHAVE_ADJTIME=0 if `adjtime' does not exist (SVR0?)
+#  -DHAVE_ADJTIME=0 if 'adjtime' does not exist (SVR0?)
 #  -DHAVE_DOS_FILE_NAMES if file names have drive specifiers etc. (MS-DOS)
-#  -DHAVE_GETTEXT=1 if `gettext' works (GNU, Linux, Solaris); also see LDLIBS
+#  -DHAVE_GETTEXT=1 if 'gettext' works (GNU, Linux, Solaris); also see LDLIBS
 #  -DHAVE_INCOMPATIBLE_CTIME_R=1 if your system's time.h declares
 #	ctime_r and asctime_r incompatibly with the POSIX standard (Solaris 8).
 #  -DHAVE_INTTYPES_H=1 if you have a pre-C99 compiler with "inttypes.h"
@@ -236,7 +236,7 @@ ZIC=		$(zic) $(ZFLAGS)
 
 ZFLAGS=
 
-# The name of a Posix-compliant `awk' on your system.
+# The name of a Posix-compliant 'awk' on your system.
 AWK=		awk
 
 # The full path name of a Posix-compliant shell, preferably one that supports
@@ -485,7 +485,7 @@ zdump.8.txt:	zdump.8
 zic.8.txt:	zic.8
 
 $(MANTXTS):	workman.sh
-		LC_ALL=C sh workman.sh `expr $@ : '\(.*\)\.txt$$'` >$@
+		LC_ALL=en_US.utf8 sh workman.sh `expr $@ : '\(.*\)\.txt$$'` >$@
 
 # Set the time stamps to those of the git repository, if available,
 # and if the files have not changed since then.
diff --git a/NEWS b/NEWS
index 848adf7..2daa1e1 100644
--- a/NEWS
+++ b/NEWS
@@ -12,11 +12,11 @@ Unreleased, experimental changes
     'localtime', 'mktime', etc. now use much less stack space if ALL_STATE
     is defined.  (Thanks to Elliott Hughes for reporting the problem.)
 
-  Changes affecting commentary
+  Changes affecting documentation and commentary
 
-    Commentary now uses UTF-8 instead of US-ASCII, allowing the use of
-    proper accents in foreign words and names.  Code and data have not
-    changed.
+    Documentation and commentary now prefer UTF-8 to US-ASCII,
+    allowing the use of proper accents in foreign words and names.
+    Code and data have not changed.
 
 
 Release 2014e - 2014-06-12 21:53:52 -0700
@@ -2219,8 +2219,8 @@ Release code95e - 1995-10-13 13:23:57 -0400
 
 Release data95i - 1995-09-26 10:43:26 -0400
 
-  For Canada/Central, guess that the Sun customer's ``one week too
-  early'' was just a approximation, and the true error is one month
+  For Canada/Central, guess that the Sun customer's "one week too
+  early" was just a approximation, and the true error is one month
   too early.  This is consistent with the rest of Canada.
 
 
@@ -2343,7 +2343,7 @@ Release 94b - 1994-02-07 10:04:33 -0500
   as extensive as Shanks but has a few goodies of its own.  I used it
   to update the tables.  I also fixed some more as a result of
   correspondence with Adam David and Peter Ilieve, and move some stray
-  links from `europe' to `backward'.  I corrected some scanning errors
+  links from 'europe' to 'backward'.  I corrected some scanning errors
   in usno1989.
 
   As far as the code goes, I fixed zic to allow years in the range
diff --git a/africa b/africa
index a083fc8..3e15756 100644
--- a/africa
+++ b/africa
@@ -35,13 +35,13 @@
 # Previous editions of this database used WAT, CAT, SAT, and EAT
 # for +0:00 through +3:00, respectively,
 # but Mark R V Murray reports that
-# `SAST' is the official abbreviation for +2:00 in the country of South Africa,
-# `CAT' is commonly used for +2:00 in countries north of South Africa, and
-# `WAT' is probably the best name for +1:00, as the common phrase for
-# the area that includes Nigeria is ``West Africa''.
-# He has heard of ``Western Sahara Time'' for +0:00 but can find no reference.
+# 'SAST' is the official abbreviation for +2:00 in the country of South Africa,
+# 'CAT' is commonly used for +2:00 in countries north of South Africa, and
+# 'WAT' is probably the best name for +1:00, as the common phrase for
+# the area that includes Nigeria is "West Africa".
+# He has heard of "Western Sahara Time" for +0:00 but can find no reference.
 #
-# To make things confusing, `WAT' seems to have been used for -1:00 long ago;
+# To make things confusing, 'WAT' seems to have been used for -1:00 long ago;
 # I'd guess that this was because people needed _some_ name for -1:00,
 # and at the time, far west Africa was the only major land area in -1:00.
 # This usage is now obsolete, as the last use of -1:00 on the African
@@ -54,7 +54,7 @@
 #	 2:00	SAST	South Africa Standard Time
 # and Murray suggests the following abbreviation:
 #	 1:00	WAT	West Africa Time
-# I realize that this leads to `WAT' being used for both -1:00 and 1:00
+# I realize that this leads to 'WAT' being used for both -1:00 and 1:00
 # for times before 1976, but this is the best I can think of
 # until we get more information.
 #
@@ -456,7 +456,7 @@ Zone	Africa/Banjul	-1:06:36 -	LMT	1912
 
 # Ghana
 # Rule	NAME	FROM	TO	TYPE	IN	ON	AT	SAVE	LETTER/S
-# Whitman says DST was observed from 1931 to ``the present'';
+# Whitman says DST was observed from 1931 to "the present";
 # go with Shanks & Pottenger.
 Rule	Ghana	1936	1942	-	Sep	 1	0:00	0:20	GHST
 Rule	Ghana	1936	1942	-	Dec	31	0:00	0	GMT
@@ -704,7 +704,7 @@ Zone	Indian/Mayotte	3:00:56 -	LMT	1911 Jul	# Mamoutzou
 			3:00	-	EAT
 
 # Morocco
-# See the `europe' file for Spanish Morocco (Africa/Ceuta).
+# See the 'europe' file for Spanish Morocco (Africa/Ceuta).
 
 # From Alex Krivenyshev (2008-05-09):
 # Here is an article that Morocco plan to introduce Daylight Saving Time between
diff --git a/asia b/asia
index 24566ca..3ad5312 100644
--- a/asia
+++ b/asia
@@ -32,7 +32,7 @@
 # A reliable and entertaining source about time zones is
 # Derek Howse, Greenwich time and longitude, Philip Wilson Publishers (1997).
 #
-# I invented the abbreviations marked `*' in the following table;
+# I invented the abbreviations marked '*' in the following table;
 # the rest are from earlier versions of this file, or from other sources.
 # Corrections are welcome!
 #	     std  dst
@@ -53,7 +53,7 @@
 #	9:00 KST  KDT	Korea
 #	9:30 CST	(Australian) Central Standard Time
 #
-# See the `europe' file for Russia and Turkey in Asia.
+# See the 'europe' file for Russia and Turkey in Asia.
 
 # From Guy Harris:
 # Incorporates data for Singapore from Robert Elz' asia 1.1, as well as
@@ -63,7 +63,7 @@
 
 ###############################################################################
 
-# These rules are stolen from the `europe' file.
+# These rules are stolen from the 'europe' file.
 # Rule	NAME	FROM	TO	TYPE	IN	ON	AT	SAVE	LETTER/S
 Rule	EUAsia	1981	max	-	Mar	lastSun	 1:00u	1:00	S
 Rule	EUAsia	1979	1995	-	Sep	lastSun	 1:00u	0	-
@@ -1014,7 +1014,7 @@ Rule	Iraq	1983	only	-	Mar	31	0:00	1:00	D
 Rule	Iraq	1984	1985	-	Apr	1	0:00	1:00	D
 Rule	Iraq	1985	1990	-	Sep	lastSun	1:00s	0	S
 Rule	Iraq	1986	1990	-	Mar	lastSun	1:00s	1:00	D
-# IATA SSIM (1991/1996) says Apr 1 12:01am UTC; guess the `:01' is a typo.
+# IATA SSIM (1991/1996) says Apr 1 12:01am UTC; guess the ':01' is a typo.
 # Shanks & Pottenger say Iraq did not observe DST 1992/1997; ignore this.
 #
 Rule	Iraq	1991	2007	-	Apr	 1	3:00s	1:00	D
@@ -1258,12 +1258,12 @@ Zone	Asia/Jerusalem	2:20:54 -	LMT	1880
 
 # Japan
 
-# `9:00' and `JST' is from Guy Harris.
+# '9:00' and 'JST' is from Guy Harris.
 
 # From Paul Eggert (1995-03-06):
 # Today's _Asahi Evening News_ (page 4) reports that Japan had
-# daylight saving between 1948 and 1951, but ``the system was discontinued
-# because the public believed it would lead to longer working hours.''
+# daylight saving between 1948 and 1951, but "the system was discontinued
+# because the public believed it would lead to longer working hours."
 
 # From Mayumi Negishi in the 2005-08-10 Japan Times
 # <http://www.japantimes.co.jp/cgi-bin/getarticle.pl5?nn20050810f2.htm>:
@@ -2264,7 +2264,7 @@ Zone	Asia/Karachi	4:28:12 -	LMT	1907
 # <a href="http://www.worldtimezone.com/dst_news/dst_news_gazastrip05.html">
 # http://www.worldtimezone.com/dst_news/dst_news_gazastrip05.html
 # </a>
-# The rules for Egypt are stolen from the `africa' file.
+# The rules for Egypt are stolen from the 'africa' file.
 
 # From Steffen Thorsen (2011-09-30):
 # West Bank did end Daylight Saving Time this morning/midnight (2011-09-30
@@ -2444,8 +2444,8 @@ Zone	Asia/Singapore	6:55:25 -	LMT	1901 Jan  1
 # "Sri Lanka advances clock by an hour to avoid blackout"
 # (www.virtual-pc.com/lankaweb/news/items/240596-2.html, 1996-05-24,
 # no longer available as of 1999-08-17)
-# reported ``the country's standard time will be put forward by one hour at
-# midnight Friday (1830 GMT) `in the light of the present power crisis'.''
+# reported "the country's standard time will be put forward by one hour at
+# midnight Friday (1830 GMT) 'in the light of the present power crisis'."
 #
 # From Dharmasiri Senanayake, Sri Lanka Media Minister (1996-10-24), as quoted
 # by Shamindra in
diff --git a/australasia b/australasia
index 2a8297b..f4657e2 100644
--- a/australasia
+++ b/australasia
@@ -872,7 +872,7 @@ Zone	Pacific/Wallis	12:15:20 -	LMT	1901
 # A reliable and entertaining source about time zones is
 # Derek Howse, Greenwich time and longitude, Philip Wilson Publishers (1997).
 #
-# I invented the abbreviations marked `*' in the following table;
+# I invented the abbreviations marked '*' in the following table;
 # the rest are from earlier versions of this file, or from other sources.
 # Corrections are welcome!
 #		std dst
@@ -891,8 +891,8 @@ Zone	Pacific/Wallis	12:15:20 -	LMT	1901
 #	-10:00	HST	Hawaii
 #	- 8:00	PST	Pitcairn*
 #
-# See the `northamerica' file for Hawaii.
-# See the `southamerica' file for Easter I and the Galapagos Is.
+# See the 'northamerica' file for Hawaii.
+# See the 'southamerica' file for Easter I and the Galapagos Is.
 
 ###############################################################################
 
@@ -909,21 +909,21 @@ Zone	Pacific/Wallis	12:15:20 -	LMT	1901
 # </a> covers New South Wales in particular.
 
 # From John Mackin (1991-03-06):
-# We in Australia have _never_ referred to DST as `daylight' time.
-# It is called `summer' time.  Now by a happy coincidence, `summer'
-# and `standard' happen to start with the same letter; hence, the
+# We in Australia have _never_ referred to DST as 'daylight' time.
+# It is called 'summer' time.  Now by a happy coincidence, 'summer'
+# and 'standard' happen to start with the same letter; hence, the
 # abbreviation does _not_ change...
 # The legislation does not actually define abbreviations, at least
 # in this State, but the abbreviation is just commonly taken to be the
 # initials of the phrase, and the legislation here uniformly uses
-# the phrase `summer time' and does not use the phrase `daylight
+# the phrase 'summer time' and does not use the phrase 'daylight
 # time'.
 # Announcers on the Commonwealth radio network, the ABC (for Australian
-# Broadcasting Commission), use the phrases `Eastern Standard Time'
-# or `Eastern Summer Time'.  (Note, though, that as I say in the
+# Broadcasting Commission), use the phrases 'Eastern Standard Time'
+# or 'Eastern Summer Time'.  (Note, though, that as I say in the
 # current australasia file, there is really no such thing.)  Announcers
 # on its overseas service, Radio Australia, use the same phrases
-# prefixed by the word `Australian' when referring to local times;
+# prefixed by the word 'Australian' when referring to local times;
 # time announcements on that service, naturally enough, are made in UTC.
 
 # From Arthur David Olson (1992-03-08):
@@ -1024,7 +1024,7 @@ Zone	Pacific/Wallis	12:15:20 -	LMT	1901
 # Mark Prior writes that his newspaper
 # reports that NSW's fall 1995 change will occur at 2:00,
 # but Robert Elz says it's been 3:00 in Victoria since 1970
-# and perhaps the newspaper's `2:00' is referring to standard time.
+# and perhaps the newspaper's '2:00' is referring to standard time.
 # For now we'll continue to assume 2:00s for changes since 1960.
 
 # From Eric Ulevik (1998-01-05):
@@ -1316,7 +1316,7 @@ Zone	Pacific/Wallis	12:15:20 -	LMT	1901
 # Based on law library research by John Mackin,
 # who notes:
 #	In Australia, time is not legislated federally, but rather by the
-#	individual states.  Thus, while such terms as ``Eastern Standard Time''
+#	individual states.  Thus, while such terms as "Eastern Standard Time"
 #	[I mean, of course, Australian EST, not any other kind] are in common
 #	use, _they have NO REAL MEANING_, as they are not defined in the
 #	legislation.  This is very important to understand.
@@ -1356,11 +1356,11 @@ Zone	Pacific/Wallis	12:15:20 -	LMT	1901
 # <a href="http://abc.net.au/news/olympics/1999/06/item19990601114608_1.htm">
 # Qld says no to daylight savings for Olympics
 # </a> (1999-06-01), which quotes Queensland Premier Peter Beattie as saying
-# ``Look you've got to remember in my family when this came up last time
+# "Look you've got to remember in my family when this came up last time
 # I voted for it, my wife voted against it and she said to me it's all very
 # well for you, you don't have to worry about getting the children out of
 # bed, getting them to school, getting them to sleep at night.
-# I've been through all this argument domestically...my wife rules.''
+# I've been through all this argument domestically...my wife rules."
 #
 # Broken Hill will stick with South Australian time in 2000.  See:
 # <a href="http://abc.net.au/news/regionals/brokenh/monthly/regbrok-21jul1999-6.htm">
@@ -1381,7 +1381,7 @@ Zone	Pacific/Wallis	12:15:20 -	LMT	1901
 # Yancowinna
 
 # From John Mackin (1989-01-04):
-# `Broken Hill' means the County of Yancowinna.
+# 'Broken Hill' means the County of Yancowinna.
 
 # From George Shepherd via Simon Woodhead via Robert Elz (1991-03-06):
 # # YANCOWINNA..  [ Confirmation courtesy of Broken Hill Postmaster ]
@@ -1539,7 +1539,7 @@ Zone	Pacific/Wallis	12:15:20 -	LMT	1901
 
 # From Paul Eggert (1996-01-22):
 # Today's _Wall Street Journal_ (page 1) reports that Kiribati
-# ``declared it the same day [throughout] the country as of Jan. 1, 1995''
+# "declared it the same day [throughout] the country as of Jan. 1, 1995"
 # as part of the competition to be first into the 21st century.
 
 
@@ -1554,8 +1554,8 @@ Zone	Pacific/Wallis	12:15:20 -	LMT	1901
 
 # N Mariana Is, Guam
 
-# Howse writes (p 153) ``The Spaniards, on the other hand, reached the
-# Philippines and the Ladrones from America,'' and implies that the Ladrones
+# Howse writes (p 153) "The Spaniards, on the other hand, reached the
+# Philippines and the Ladrones from America," and implies that the Ladrones
 # (now called the Marianas) kept American date for quite some time.
 # For now, we assume the Ladrones switched at the same time as the Philippines;
 # see Asia/Manila.
@@ -1569,8 +1569,8 @@ Zone	Pacific/Wallis	12:15:20 -	LMT	1901
 # Micronesia
 
 # Alan Eugene Davis writes (1996-03-16),
-# ``I am certain, having lived there for the past decade, that "Truk"
-# (now properly known as Chuuk) ... is in the time zone GMT+10.''
+# "I am certain, having lived there for the past decade, that 'Truk'
+# (now properly known as Chuuk) ... is in the time zone GMT+10."
 #
 # Shanks & Pottenger write that Truk switched from UTC+10 to UTC+11
 # on 1978-10-01; ignore this for now.
@@ -1629,21 +1629,21 @@ Zone	Pacific/Wallis	12:15:20 -	LMT	1901
 
 # Howse writes (p 153, citing p 10 of the 1883-11-18 New York Herald)
 # that in 1879 the King of Samoa decided to change
-# ``the date in his kingdom from the Antipodean to the American system,
+# "the date in his kingdom from the Antipodean to the American system,
 # ordaining -- by a masterpiece of diplomatic flattery -- that
-# the Fourth of July should be celebrated twice in that year.''
+# the Fourth of July should be celebrated twice in that year."
 
 
 # Tonga
 
 # From Paul Eggert (1996-01-22):
-# Today's _Wall Street Journal_ (p 1) reports that ``Tonga has been plotting
-# to sneak ahead of [New Zealanders] by introducing daylight-saving time.''
+# Today's _Wall Street Journal_ (p 1) reports that "Tonga has been plotting
+# to sneak ahead of [New Zealanders] by introducing daylight-saving time."
 # Since Kiribati has moved the Date Line it's not clear what Tonga will do.
 
 # Don Mundell writes in the 1997-02-20 Tonga Chronicle
 # <a href="http://www.tongatapu.net.to/tonga/homeland/timebegins.htm">
-# How Tonga became `The Land where Time Begins'
+# How Tonga became 'The Land where Time Begins'
 # </a>:
 
 # Until 1941 Tonga maintained a standard time 50 minutes ahead of NZST
diff --git a/checktab.awk b/checktab.awk
index d78ba73..25a8d3f 100644
--- a/checktab.awk
+++ b/checktab.awk
@@ -23,7 +23,7 @@ BEGIN {
 		cc = $1
 		name = $2
 		if (cc !~ /^[A-Z][A-Z]$/) {
-			printf "%s:%d: invalid country code `%s'\n", \
+			printf "%s:%d: invalid country code '%s'\n", \
 				iso_table, iso_NR, cc >>"/dev/stderr"
 			status = 1
 		}
@@ -34,14 +34,14 @@ BEGIN {
 				s = "out of order";
 			}
 
-			printf "%s:%d: country code `%s' is %s\n", \
+			printf "%s:%d: country code '%s' is %s\n", \
 				iso_table, iso_NR, cc, s \
 				>>"/dev/stderr"
 			status = 1
 		}
 		cc0 = cc
 		if (name2cc[name]) {
-			printf "%s:%d: `%s' and `%s' have the sname name\n", \
+			printf "%s:%d: '%s' and '%s' have the sname name\n", \
 				iso_table, iso_NR, name2cc[name], cc \
 				>>"/dev/stderr"
 			status = 1
@@ -67,7 +67,7 @@ BEGIN {
 		tz = $3
 		comments = $4
 		if (cc < cc0) {
-			printf "%s:%d: country code `%s' is out of order\n", \
+			printf "%s:%d: country code '%s' is out of order\n", \
 				zone_table, zone_NR, cc >>"/dev/stderr"
 			status = 1
 		}
@@ -97,7 +97,7 @@ BEGIN {
 		tz = substr (cctz, 3)
 		if (cc_used[cc] == 1) {
 			if (tz2comments[cctz]) {
-				printf "%s:%d: unnecessary comment `%s'\n", \
+				printf "%s:%d: unnecessary comment '%s'\n", \
 					zone_table, tz2NR[tz], \
 					tz2comments[cctz] \
 					>>"/dev/stderr"
@@ -137,7 +137,7 @@ $1 ~ /^#/ { next }
 	}
 	if (tz && tz ~ /\//) {
 		if (!tztab[tz]) {
-			printf "%s: no data for `%s'\n", zone_table, tz \
+			printf "%s: no data for '%s'\n", zone_table, tz \
 				>>"/dev/stderr"
 			status = 1
 		}
@@ -154,7 +154,7 @@ END {
 	}
 	for (tz in tz2cc) {
 		if (!zoneSeen[tz]) {
-			printf "%s:%d: no Zone table for `%s'\n", \
+			printf "%s:%d: no Zone table for '%s'\n", \
 				zone_table, tz2NR[tz], tz >>"/dev/stderr"
 			status = 1
 		}
diff --git a/date.1 b/date.1
index 72c44d0..cba4e56 100644
--- a/date.1
+++ b/date.1
@@ -28,6 +28,13 @@ minutes-west
 \fR[\fIyyyy\fR]\fImmddhhmm\fR[\fIyy\fR][\fB.\fIss\fR]
 ]
 .SH DESCRIPTION
+.ie '\(lq'' .ds lq \&"\"
+.el .ds lq \(lq\"
+.ie '\(rq'' .ds rq \&"\"
+.el .ds rq \(rq\"
+.de q
+\\$3\*(lq\\$1\*(rq\\$2
+..
 .I Date
 without arguments writes the date and time to the standard output in
 the form
@@ -42,13 +49,13 @@ replaced by the local time zone's abbreviation
 environment variable if set).
 The exact output format depends on the locale.
 .PP
-If a command-line argument starts with a plus sign
-.RB (` + '),
+If a command-line argument starts with a plus sign (\c
+.q "\fB+\fP" ),
 the rest of the argument is used as a
 .I format
 that controls what appears in the output.
-In the format, when a percent sign
-.RB (` % ')
+In the format, when a percent sign (\c
+.q "\fB%\fP"
 appears,
 it and the character after it are not output,
 but rather identify part of the date or time
@@ -106,7 +113,8 @@ a newline character is always added at the end of the output.
 .PP
 In Sunday-based week numbering,
 the first Sunday of the year begins week 1;
-days preceding it are part of ``week 0.''
+days preceding it are part of
+.q "week 0" .
 In Monday-based week numbering,
 the first Monday of the year begins week 1.
 .PP
@@ -149,12 +157,18 @@ Do not notify other networked systems of the time change.
 .TP
 .BI "\-d " dsttype
 Set the kernel-stored Daylight Saving Time type to the given value.
-(The kernel-stored DST type is used mostly by ``old'' binaries.)
+(The kernel-stored DST type is used mostly by
+.q "old"
+binaries.)
 .TP
 .BI "\-t " minutes-west
-Set the kernel-stored ``minutes west of UTC'' value to the one given on the
+Set the kernel-stored
+.q "minutes west of UTC"
+value to the one given on the
 command line.
-(The kernel-stored DST type is used mostly by ``old'' binaries.)
+(The kernel-stored DST type is used mostly by
+.q "old"
+binaries.)
 .TP
 .BI "\-a " adjustment
 Change the time forward (or backward) by the number of seconds
diff --git a/date.c b/date.c
index fe1311a..78b94b4 100644
--- a/date.c
+++ b/date.c
@@ -10,7 +10,7 @@
  * by the University of California, Berkeley.  The name of the
  * University may not be used to endorse or promote products derived
  * from this software without specific prior written permission.
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
+ * THIS SOFTWARE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR
  * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
  * WARRANTIES OF MERCHANT[A]BILITY AND FITNESS FOR A PARTICULAR PURPOSE.
  */
@@ -394,7 +394,7 @@ reset(const time_t newt, const int nflag)
 	(void) strcpy(sx.after.ut_line, NTIME_MSG);
 #if !SUPPRESS_WTMPX_FILE_UPDATE
 	/* In Solaris 2.5 (and presumably other systems),
-	   `date' does not update /var/adm/wtmpx.
+	   'date' does not update /var/adm/wtmpx.
 	   This must be a bug.  If you'd like to reproduce the bug,
 	   define SUPPRESS_WTMPX_FILE_UPDATE to be nonzero.  */
 	fid = open(WTMPX_FILE, O_WRONLY | O_APPEND);
diff --git a/etcetera b/etcetera
index 9ba7f7b..d02a478 100644
--- a/etcetera
+++ b/etcetera
@@ -14,7 +14,7 @@ Zone	Etc/UTC		0	-	UTC
 Zone	Etc/UCT		0	-	UCT
 
 # The following link uses older naming conventions,
-# but it belongs here, not in the file `backward',
+# but it belongs here, not in the file 'backward',
 # as functions like gmtime load the "GMT" file to handle leap seconds properly.
 # We want this to work even on installations that omit the other older names.
 Link	Etc/GMT				GMT
diff --git a/iso3166.tab b/iso3166.tab
index a1e4b42..38d356d 100644
--- a/iso3166.tab
+++ b/iso3166.tab
@@ -16,7 +16,7 @@
 # Columns are separated by a single tab.
 # The table is sorted by country code.
 #
-# Lines beginning with `#' are comments.
+# Lines beginning with '#' are comments.
 #
 # This table is intended as an aid for users, to help them select time
 # zone data appropriate for their practical needs.  It is not intended
diff --git a/localtime.c b/localtime.c
index ff51d64..62412a5 100644
--- a/localtime.c
+++ b/localtime.c
@@ -729,10 +729,10 @@ getsecs(register const char *strp, int_fast32_t *const secsp)
 	int	num;
 
 	/*
-	** `HOURSPERDAY * DAYSPERWEEK - 1' allows quasi-Posix rules like
+	** 'HOURSPERDAY * DAYSPERWEEK - 1' allows quasi-Posix rules like
 	** "M10.4.6/26", which does not conform to Posix,
 	** but which specifies the equivalent of
-	** ``02:00 on the first Sunday on or after 23 Oct''.
+	** "02:00 on the first Sunday on or after 23 Oct".
 	*/
 	strp = getnum(strp, &num, 0, HOURSPERDAY * DAYSPERWEEK - 1);
 	if (strp == NULL)
@@ -746,7 +746,7 @@ getsecs(register const char *strp, int_fast32_t *const secsp)
 		*secsp += num * SECSPERMIN;
 		if (*strp == ':') {
 			++strp;
-			/* `SECSPERMIN' allows for leap seconds. */
+			/* 'SECSPERMIN' allows for leap seconds.  */
 			strp = getnum(strp, &num, 0, SECSPERMIN);
 			if (strp == NULL)
 				return NULL;
diff --git a/newctime.3 b/newctime.3
index 170fa36..1548c1a 100644
--- a/newctime.3
+++ b/newctime.3
@@ -33,6 +33,15 @@ asctime, ctime, difftime, gmtime, localtime, mktime \- convert date and time to
 .B cc ... -ltz
 .fi
 .SH DESCRIPTION
+.ie '\(en'' .ds en \-
+.el .ds en \(en
+.ie '\(lq'' .ds lq \&"\"
+.el .ds lq \(lq\"
+.ie '\(rq'' .ds rq \&"\"
+.el .ds rq \(rq\"
+.de q
+\\$3\*(lq\\$1\*(rq\\$2
+..
 .I Ctime\^
 converts a long integer, pointed to by
 .IR clock ,
@@ -71,11 +80,15 @@ Some implementations support leap seconds, in contradiction to POSIX.
 .I Localtime\^
 and
 .I gmtime\^
-return pointers to ``tm'' structures, described below.
+return pointers to
+.q "tm"
+structures, described below.
 .I Localtime\^
 corrects for the time zone and any time zone adjustments
 (such as Daylight Saving Time in the United States).
-After filling in the ``tm'' structure,
+After filling in the
+.q "tm"
+structure,
 .I localtime
 sets the
 .BR tm_isdst 'th
@@ -91,7 +104,8 @@ converts to Coordinated Universal Time.
 .PP
 .I Asctime\^
 converts a time value contained in a
-``tm'' structure to a string,
+.q "tm"
+structure to a string,
 as shown in the above example,
 and returns a pointer to the string.
 .PP
@@ -153,7 +167,9 @@ returns the difference between two calendar times,
 .IR time0 ),
 expressed in seconds.
 .PP
-Declarations of all the functions and externals, and the ``tm'' structure,
+Declarations of all the functions and externals, and the
+.q "tm"
+structure,
 are in the
 .B <time.h>\^
 header file.
@@ -164,14 +180,14 @@ includes the following fields:
 .PP
 .nf
 .ta .5i +\w'long tm_gmtoff;\0\0'u
-	int tm_sec;	/\(** seconds (0 - 60) \(**/
-	int tm_min;	/\(** minutes (0 - 59) \(**/
-	int tm_hour;	/\(** hours (0 - 23) \(**/
-	int tm_mday;	/\(** day of month (1 - 31) \(**/
-	int tm_mon;	/\(** month of year (0 - 11) \(**/
-	int tm_year;	/\(** year \- 1900 \(**/
+	int tm_sec;	/\(** seconds (0\*(en60) \(**/
+	int tm_min;	/\(** minutes (0\*(en59) \(**/
+	int tm_hour;	/\(** hours (0\*(en23) \(**/
+	int tm_mday;	/\(** day of month (1\*(en31) \(**/
+	int tm_mon;	/\(** month of year (0\*(en11) \(**/
+	int tm_year;	/\(** year \(mi 1900 \(**/
 	int tm_wday;	/\(** day of week (Sunday = 0) \(**/
-	int tm_yday;	/\(** day of year (0 - 365) \(**/
+	int tm_yday;	/\(** day of year (0\*(en365) \(**/
 	int tm_isdst;	/\(** is summer time in effect? \(**/
 	char \(**tm_zone;	/\(** abbreviation of timezone name \(**/
 	long tm_gmtoff;	/\(** offset from UT in seconds \(**/
diff --git a/newstrftime.3 b/newstrftime.3
index d39915c..a67d119 100644
--- a/newstrftime.3
+++ b/newstrftime.3
@@ -22,7 +22,7 @@
 .\"    may be used to endorse or promote products derived from this software
 .\"    without specific prior written permission.
 .\"
-.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS" AND
 .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
 .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
 .\" ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
diff --git a/newtzset.3 b/newtzset.3
index 2568e45..4af938b 100644
--- a/newtzset.3
+++ b/newtzset.3
@@ -8,6 +8,15 @@ tzset \- initialize time conversion information
 .B cc ... -ltz
 .fi
 .SH DESCRIPTION
+.ie '\(en'' .ds en \-
+.el .ds en \(en
+.ie '\(lq'' .ds lq \&"\"
+.el .ds lq \(lq\"
+.ie '\(rq'' .ds rq \&"\"
+.el .ds rq \(rq\"
+.de q
+\\$3\*(lq\\$1\*(rq\\$2
+..
 .I Tzset
 uses the value of the environment variable
 .B TZ
@@ -75,9 +84,9 @@ except a leading colon
 .RB ( : ),
 digits, comma
 .RB ( , ),
-minus
+ASCII minus
 .RB ( \(mi ),
-plus
+ASCII plus
 .RB ( \(pl ),
 and ASCII NUL are allowed.
 .TP
@@ -108,11 +117,11 @@ follows
 summer time is assumed to be one hour ahead of standard time.  One or
 more digits may be used; the value is always interpreted as a decimal
 number.  The hour must be between zero and 24, and the minutes (and
-seconds) \(em if present \(em between zero and 59.  If preceded by a
-.RB `` \(mi '',
+seconds) \*(en if present \*(en between zero and 59.  If preceded by a
+.q "\fB-\fP" ,
 the time zone shall be east of the Prime Meridian; otherwise it shall be
 west (which may be indicated by an optional preceding
-.RB `` \(pl '').
+.q "\fB+\fP" .
 .TP
 .I rule
 Indicates when to change to and back from summer time.  The
@@ -146,8 +155,8 @@ is one of the following:
 The Julian day
 .I n
 .RI "(1\ \(<=" "\ n\ " "\(<=\ 365).
-Leap days are not counted; that is, in all years \(em including leap
-years \(em February 28 is day 59 and March 1 is day 60.  It is
+Leap days are not counted; that is, in all years \*(en including leap
+years \*(en February 28 is day 59 and March 1 is day 60.  It is
 impossible to explicitly refer to the occasional February 29.
 .TP
 .I n
@@ -167,10 +176,8 @@ of month
 of the year
 .RI "(1\ \(<=" "\ n\ " "\(<=\ 5,
 .RI "1\ \(<=" "\ m\ " "\(<=\ 12,
-where week 5 means ``the last
-.I d
-day in month
-.IR m ''
+where week 5 means
+.q "the last \fId\fP day in month \fIm\fP"
 which may occur in either the fourth or the fifth week).  Week 1 is the
 first week in which the
 .IR d' th
@@ -181,14 +188,16 @@ The
 .I time
 has the same format as
 .I offset
-except that POSIX does not allow a leading sign
-.RB (`` \(mi ''
+except that POSIX does not allow a leading sign (\c
+.q "\fB-\fP"
 or
-.RB `` \(pl '').
+.q "\fB+\fP" ).
 As an extension to POSIX, the hours part of
 .I time
 can range from \(mi167 through 167; this allows for unusual rules such
-as "the Saturday before the first Sunday of March".  The default, if
+as
+.q "the Saturday before the first Sunday of March" .
+The default, if
 .I time
 is not given, is
 .BR 02:00:00 .
@@ -203,14 +212,14 @@ extensions to POSIX.
 stands for US Eastern Standard
 Time (EST), 5 hours behind UTC, without daylight saving.
 .TP
-.B FJT\(mi12FJST,M10.3.1/146,M1.3.4/75
+.B FJT-12FJST,M10.3.1/146,M1.3.4/75
 stands for Fiji Time (FJT) and Fiji Summer Time (FJST), 12 hours ahead
 of UTC, springing forward on October's third Monday at
 146:00 (i.e., 02:00 on the first Sunday on or after October 21), and
 falling back on January's third Thursday at 75:00 (i.e., 03:00 on the
 first Sunday on or after January 18).
 .TP
-.B IST\(mi2IDT,M3.4.4/26,M10.5.0
+.B IST-2IDT,M3.4.4/26,M10.5.0
 stands for Israel Standard Time (IST) and Israel Daylight Time (IDT),
 2 hours ahead of UTC, springing forward on March's fourth
 Thursday at 26:00 (i.e., 02:00 on the first Friday on or after March
@@ -226,7 +235,7 @@ all year and the initial
 .B WART
 is a placeholder.
 .TP
-.B WGT3WGST,M3.5.0/\(mi2,M10.5.0/\(mi1
+.B WGT3WGST,M3.5.0/-2,M10.5.0/-1
 stands for Western Greenland Time (WGT) and Western Greenland Summer
 Time (WGST), 3 hours behind UTC, where clocks follow the EU rules of
 springing forward on March's last Sunday at 01:00 UTC (\(mi02:00 local
diff --git a/private.h b/private.h
index 4e8f4ae..be0c8c2 100644
--- a/private.h
+++ b/private.h
@@ -19,7 +19,7 @@
 
 /*
 ** Defaults for preprocessor symbols.
-** You can override these in your C compiler options, e.g. `-DHAVE_ADJTIME=0'.
+** You can override these in your C compiler options, e.g. '-DHAVE_ADJTIME=0'.
 */
 
 #ifndef HAVE_ADJTIME
@@ -374,7 +374,7 @@ static time_t const time_t_max =
 
 /*
 ** For the benefit of GNU folk...
-** `_(MSGID)' uses the current locale's message library string for MSGID.
+** '_(MSGID)' uses the current locale's message library string for MSGID.
 ** The default is to use gettext if available, and use MSGID otherwise.
 */
 
diff --git a/strftime.c b/strftime.c
index c324f1b..f29c9c2 100644
--- a/strftime.c
+++ b/strftime.c
@@ -19,7 +19,7 @@
 ** by the University of California, Berkeley. The name of the
 ** University may not be used to endorse or promote products derived
 ** from this software without specific prior written permission.
-** THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
+** THIS SOFTWARE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR
 ** IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
 ** WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
 */
@@ -713,9 +713,9 @@ _loc(void)
 	if (oldsun) {
 		/*
 		** SunOS 4 used an obsolescent format; see localdtconv(3).
-		** c_fmt had the ``short format for dates and times together''
+		** c_fmt had the "short format for dates and times together"
 		** (SunOS 4 date, "%a %b %e %T %Z %Y" in the C locale);
-		** date_fmt had the ``long format for dates''
+		** date_fmt had the "long format for dates"
 		** (SunOS 4 strftime %C, "%A, %B %e, %Y" in the C locale).
 		** Discard the latter in favor of the former.
 		*/
diff --git a/time2posix.3 b/time2posix.3
index e17b011..c02b1a2 100644
--- a/time2posix.3
+++ b/time2posix.3
@@ -15,6 +15,15 @@ time2posix, posix2time \- convert seconds since the Epoch
 .B cc ... -ltz
 .fi
 .SH DESCRIPTION
+.ie '\(en'' .ds en \-
+.el .ds en \(en
+.ie '\(lq'' .ds lq \&"\"
+.el .ds lq \(lq\"
+.ie '\(rq'' .ds rq \&"\"
+.el .ds rq \(rq\"
+.de q
+\\$3\*(lq\\$1\*(rq\\$2
+..
 IEEE Standard 1003.1
 (POSIX)
 legislates that a time_t value of
@@ -29,14 +38,16 @@ enabled,
 however,
 no such adjustment is needed and
 time_t values continue to increase over leap events
-(as a true `seconds since...' value).
+(as a true
+.q "seconds since..."
+value).
 This means that these values will differ from those required by POSIX
 by the net number of leap seconds inserted since the Epoch.
 .PP
 Typically this is not a problem as the type time_t is intended
 to be
 (mostly)
-opaque\(emtime_t values should only be obtained-from and
+opaque \*(en time_t values should only be obtained-from and
 passed-to functions such as
 .IR time(2) ,
 .IR localtime(3) ,
diff --git a/tzselect.ksh b/tzselect.ksh
index 9d70691..963001a 100644
--- a/tzselect.ksh
+++ b/tzselect.ksh
@@ -40,7 +40,7 @@ REPORT_BUGS_TO=tz at iana.org
 # Check for awk Posix compliance.
 ($AWK -v x=y 'BEGIN { exit 123 }') </dev/null >/dev/null 2>&1
 [ $? = 123 ] || {
-	echo >&2 "$0: Sorry, your \`$AWK' program is not Posix compatible."
+	echo >&2 "$0: Sorry, your '$AWK' program is not Posix compatible."
 	exit 1
 }
 
@@ -308,7 +308,7 @@ while
 				exit 0
 			}'
 		do
-			echo >&2 "\`$TZ' is not a conforming" \
+			echo >&2 "'$TZ' is not a conforming" \
 				'Posix time zone string.'
 		done
 		TZ_for_date=$TZ;;
diff --git a/workman.sh b/workman.sh
index 7675dc1..ed95fff 100644
--- a/workman.sh
+++ b/workman.sh
@@ -14,6 +14,8 @@ echo ".am TH
 ..
 .rm }H
 .rm }F" | nroff -man - ${1+"$@"} | perl -ne '
+	binmode STDIN, '\'':encoding(utf8)'\'';
+	binmode STDOUT, '\'':encoding(utf8)'\'';
 	chomp;
 	s/.\010//g;
 	s/\s*$//;
diff --git a/zdump.c b/zdump.c
index c48ac84..0b74c4c 100644
--- a/zdump.c
+++ b/zdump.c
@@ -185,7 +185,7 @@ enum { SECSPER400YEARS_FITS = SECSPERLYEAR <= INTMAX_MAX / 400 };
 
 /*
 ** For the benefit of GNU folk...
-** `_(MSGID)' uses the current locale's message library string for MSGID.
+** '_(MSGID)' uses the current locale's message library string for MSGID.
 ** The default is to use gettext if available, and use MSGID otherwise.
 */
 
diff --git a/zic.8 b/zic.8
index 5f5268c..cfe0ad4 100644
--- a/zic.8
+++ b/zic.8
@@ -29,10 +29,10 @@ zic \- time zone compiler
 .I filename
 \&... ]
 .SH DESCRIPTION
-.if t .ds lq ``
-.if t .ds rq ''
-.if n .ds lq \&"\"
-.if n .ds rq \&"\"
+.ie '\(lq'' .ds lq \&"\"
+.el .ds lq \(lq\"
+.ie '\(rq'' .ds rq \&"\"
+.el .ds rq \(rq\"
 .de q
 \\$3\*(lq\\$1\*(rq\\$2
 ..
@@ -256,7 +256,7 @@ if the given time is local
 time,
 .B s
 if the given time is local
-.q standard
+.q "standard"
 time, or
 .B u
 (or
@@ -283,13 +283,13 @@ suffixes are not used).
 Gives the
 .q "variable part"
 (for example, the
-.q S
+.q "S"
 or
-.q D
+.q "D"
 in
-.q EST
+.q "EST"
 or
-.q EDT )
+.q "EDT" )
 of time zone abbreviations to be used when this rule is in effect.
 If this field is
 .BR \- ,
@@ -353,16 +353,16 @@ fields of a rule; trailing fields can be omitted, and default to the
 earliest possible value for the missing fields.
 .IP
 The next line must be a
-.q continuation
+.q "continuation"
 line; this has the same form as a zone line except that the
 string
-.q Zone
+.q "Zone"
 and the name are omitted, as the continuation line will
 place information starting at the time specified as the
-.q until
+.q "until"
 information in the previous line in the file used by the previous line.
 Continuation lines may contain
-.q until
+.q "until"
 information, just as zone lines do, indicating that the next line is a further
 continuation.
 .PP
@@ -418,10 +418,10 @@ The
 .B CORR
 field
 should be
-.q +
+.q "+"
 if a second was added
 or
-.q -
+.q "-"
 if a second was skipped.
 .\" There's no need to document the following, since it's impossible for more
 .\" than one leap second to be inserted or deleted at a time.
@@ -438,11 +438,11 @@ The
 .B R/S
 field
 should be (an abbreviation of)
-.q Stationary
+.q "Stationary"
 if the leap second time given by the other fields should be interpreted as UTC
 or
 (an abbreviation of)
-.q Rolling
+.q "Rolling"
 if the leap second time given by the other fields should be interpreted as
 local wall clock time.
 .SH "EXTENDED EXAMPLE"
diff --git a/zic.c b/zic.c
index 07d6c30..577c7ce 100644
--- a/zic.c
+++ b/zic.c
@@ -32,10 +32,10 @@ typedef int_fast64_t	zic_t;
 #endif
 
 /*
-** On some ancient hosts, predicates like `isspace(C)' are defined
+** On some ancient hosts, predicates like 'isspace(C)' are defined
 ** only if isascii(C) || C == EOF. Modern hosts obey the C Standard,
 ** which says they are defined only if C == ((unsigned char) C) || C == EOF.
-** Neither the C Standard nor Posix require that `isascii' exist.
+** Neither the C Standard nor Posix require that 'isascii' exist.
 ** For portability, we check both ancient and modern requirements.
 ** If isascii is not defined, the isascii check succeeds trivially.
 */
-- 
1.9.1



More information about the tz mailing list