Debian Codegraph @

Changes

raw
1 Revision history for MARC::Charset
2
3 1.35 Tue Aug 13 19:50:55 PDT 2013
4 - improve conversion of certain composed characters to MARC8
5
6 Some characters should not be fully decomposed
7 before converting them to MARC8. This patch adds
8 a table of such characters, based on Annex A of
9 http://www.loc.gov/marc/marbi/2006/2006-04.html
10 and on some sample records provided by Jason
11 Stephenson of MVLC.
12
13 - recognize G0 and G1 characters properly
14
15 When converting from MARC8 to UTF8, MARC::Charset now
16 properly recognizes if a (single-byte) MARC8 character falls
17 in G0 or G1.
18
19 This is part of the fix for RT#63271 (converting characters
20 in the Extended Cyrillic character set), but should also
21 fix similar issues with converting characters in the extended
22 Arabic set.
23
24 This commit also means that all MARC8 character sets that support
25 both G0 and G1 wll be properly converted, regardless of whether
26 they're currently set as the G0 or G1 character set. For example,
27 it is now possible to convert Extended Latin as G0 or Basic Latin
28 as G1.
29
30 This fixes RT#63271
31
32 - have MARC::Charset::Code->marc_value() handle G0/G1 conversion
33
34 Since there's at present no need to do things like have
35 ANSEL be the G0 character set when converting from UTF8 to
36 MARC8, this commit centralizes the logic for deciding
37 whether to return the G0 or G1 MARC8 representation of a
38 character.
39
40 Also add MARC::Charset::Code->g0_marc_value(), which returns
41 the G0 representation of the character for use by the
42 character DB.
43
44 - New test cases for converting Vietnamese and Extended Cyrillic
45 text.
46
47 1.34 Mon Feb 11 09:10:35 PST 2013
48 - RT#83257: use AnyDBM_File rather than hardcode GDBM_File
49
50 To improve portability, use AnyDBM_File to select a DBM
51 rather than rely on GDBM_File. GDBM_File apparently used
52 to be a core module, but not all distributions included it,
53 particularly OS X. In any event, GDBM_File is no longer
54 core.
55
56 This patch also includes a tweak to allow MARC::Charset to
57 work with NDBM_File and ODBM_File, neither of which
58 support 'exists'.
59
60 I've tested MARC::Charset successfully on the following
61 DBMs:
62
63 - GDBM_File
64 - DB_File
65 - NDBM_File
66 - ODBM_File
67 - SDBM_File
68
69 This is also my preferred order; SDBM_File is selected last
70 because it produces the biggest data file on disk.
71
72 - RT#38912: fix mapping of double diacritics (ligature and double
73 tilde).
74 Thanks to Thomas P. Ventimiglia for the bug report and test case.
75
76 1.33 Thu Aug 4 23:25:14 EDT 2011
77 - move build_db() to separate .PL script so that module can be
78 built even if Class::Accessor and other dependencies aren't
79 available before Makefile.PL is run.
80 - list GDBM_File as an explicit dependency, as some distributions
81 like ActivePerl don't include it even though it is a
82 core module.
83
84 1.32 Thu Jun 30 16:38:32 EDT 2011
85 - make sure utf8 flag set in output of marc8_to_utf8
86
87 1.31 Thu Sep 30 10:53:00 EDT 2010
88 - minor revision to get v1.3 Changes into the CPAN distro :-)
89
90 1.3 Wed Sep 29 10:26:49 EDT 2010
91 - added latest codetables.xml from
92 http://www.loc.gov/marc/specifications/codetables.xml (thanks to
93 Mark Muehlhaeusler for noticing that there were some Arabic updates.
94 I reapplied the changes that François Charette suggested in v0.98
95 which are still not present in LC's codetable :-(
96
97 1.2 Tue May 11 22:21:13 EDT 2010
98 - use Storable::nfreeze instead of Storable::freeze to get a more
99 portable character set database. Reported and fixed by Niko Tyni
100 of debian http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=579517
101
102 1.1 Tue Jun 30 15:51:16 EDT 2009
103 - Patch from Damyan Ivanov of the Debian Perl Group to trim the size
104 of the character mapping db by 70 times! Uses GDBM_File instead of
105 SDBM_File.
106
107 1.00 Tue May 27 08:30:56 EDT 2008
108 - Forgot to add etc/additional-iii-characters.xml to the MANIFEST
109 - seems like as good a time as any for a v1.0 release :-)
110
111 0.99 Sun May 25 08:08:05 EDT 2008
112 - Addition of characters used by III ILSs which are not covered
113 by the official LoC codetables. Thanks go to Galen Charlton.
114 - Removed PREREQ_FATAL from Makefile.PL to make CPAN testers happy
115
116 0.98 Tue Aug 7 08:28:24 EDT 2007
117 - addition of two code elements to etc/codetables.xml that enable
118 the conversion of some Arabic records that contain 0x8D and 0x8E
119 which ought to map to 0x200D and 0x200C in Unicode. These mappings
120 are present for Basic and Extended Latin, but are not present
121 in Arabic codetables. There are actually some records that seem
122 to prove the need for these rules (LCCN 2006552991). Thanks to
123 François Charette <[email protected]> for finding and proposing
124 the fix. Rules were forwarded on to LC for inclusion in canonical
125 character set mapping.
126 - added t/farsi.t and t/farsi.marc to enable testing of new
127 code rules. Hopefully this will fail if the codetables.xml is
128 inadvertently removed without LC having added the new rules.
129
130 0.97 Sun May 20 13:48:31 EDT 2007
131 - added t/null.t
132 - fixed Charset::Compiler to use the <alt> element when <ucs> is not
133 defined. Previous versions of MARC::Charset would convert valid MARC8
134 to null when it encountered a mapping that lacked a UCS value
135 many thanks to Michael O'Connor.
136 - allow carriage return and line feeds to pass unmolesteed, much the
137 same as spaces today. Apparently, UNIMARC records embed these
138 formatting characters on a regular basis.
139
140 0.96 Wed Mar 14 01:24:48 EDT 2007
141 - added ignore_errors() to skip MARC8 -> UTF8 snafus
142 - added assume_encoding() to treat transcoding failures as if they
143 are from a known, specific encoding. Useful if you have a set of
144 records that, for instance, report being MARC8 but are actually
145 encoded in Latin1 (which, btw, is completely invalid and also very
146 common). Only in effect when ignore_errors() is true.
147 - added assume_unicode() to treat invalid MARC8 as UTF8. This is a
148 convenience function based on assume_encoding().
149
150 0.92 Sat Feb 4 19:34:19 CST 2006
151 - marc8_to_utf8 and utf8_to_marc8 needed to pass along spaces
152 without translation
153 - added tests to t/escape2.t and t/utf8.t to test space behavior
154
155 0.91 Fri Feb 3 23:10:59 EST 2006
156 - fix in marc8_to_utf8 for error reporting when no mapping is found
157
158 0.9 Fri Feb 3 22:25:39 EST 2006
159 - the utf8->marc8 will prefer the first mapping it runs across in the
160 LoC XML mapping table. v0.8 preferred the last mapping found which
161 meant that utf8_to_marc8 would escape to non-ascii character sets
162 for some punctuation. Thanks Mike Rylander for helping isolate
163 this problem.
164 - added a test that makes sure punctuation is working properly
165 to no_escape.t
166 - modified test of multiple combining characters in utf8.t to
167 actually test for correct result
168
169 0.8 Tue Dec 6 07:10:19 CST 2005
170 - complete overhaul to make MARC::Charset use LoC XML mapping table.
171
172 0.7 Wed Sep 7 21:34:18 2005
173 - pod fixes
174
175 0.6 Thu Feb 26 10:26:22 2004
176 - fixed MARC::Charset::EastAsian to not hexify results of character lookup
177 since we are now storing hex values in the BerkeleyDB.
178 - also fixed the method for looking up the location of the BerkeleyDB
179 so that the testing version takes precedence over one that is
180 installed. This is why the above error was not detected during
181 testing.
182
183 0.5 Fri Apr 11 06:47:00 2003
184 - all Charset classes inherit from MARC::Charset::Generic
185 - added MARC::Charset::UTF8
186 - added MARC::Charset::to_marc8() for conversion of UTF8 back to MARC8
187 - t/115.utf8.t basic tests of to_marc8()
188 - modified Makefile.PL to create a reverse mapping database for mapping
189 UTF8 characters back to their MARC8 equivalent.
190
191 0.3 Tue Dec 3 17:09:23 2002
192 - revamped to_utf8() to handle multibyte character sets. It is no longer
193 recursive, and didn't really need to be in the first place.
194 - created MARC::Charset::EastAsian!
195
196 0.2 Sat Oct 19 03:24:22 2002
197 - Added the 'Final character' to identify Extended Latin.
198
199 0.1 Fri Jul 26 09:10:36 2002
200 - Original version