Re: [Boost-bugs] [Boost C++ Libraries] #596: make timezone csv file C/C++ compatible

Subject: Re: [Boost-bugs] [Boost C++ Libraries] #596: make timezone csv file C/C++ compatible
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2018-01-18 14:21:13


#596: make timezone csv file C/C++ compatible
-------------------------------+--------------------------------
  Reporter: nobody | Owner: James E. King, III
      Type: Feature Requests | Status: new
 Milestone: | Component: date_time
   Version: None | Severity: Problem
Resolution: None | Keywords:
-------------------------------+--------------------------------
Changes (by James E. King, III):

 * owner: az_sw_dude => James E. King, III
 * status: assigned => new

Old description:

> {{{
> The timezone database file "date_time_zonespec.csv" is
> used for the boost date/time library, and is nominally
> intended to be read as a data file, by boost code, and
> possibly also by Excel or similar software. Because
> the file consists of quoted Ansi character strings, it
> could also be treated like an initialization value for
> a char *str[] string array, and used via an #include.
> However, since the data lines do not end with a comma,
> the last field of each line will get compile-time
> concatenated with the first field of the next line,
> thus thwarting this usage.
>
> I propose that either (1) the file be changed to add a
> comma at the end of each line, or (2) the file be
> changed to add an empty "" string as an extra (dummy)
> field at the end of each line. Method (2) has the
> advantage of remaining CSV file compatible, while still
> being a valid list of quoted strings for char *str[]
> string array. The dummy zero-length string at the end
> of each line would be compile-time concatenated with
> the first field of the next line, effectively
> eliminating it.
>
> Method (1) has the advantage of not adding an extra
> dummy field.
>
> As used by the boost code, the CSV parser would have to
> be modified to simply ignore the last (dummy) field or
> the trailing comma, whichever was implemented.
>
> }}}

New description:

 {{{
 The timezone database file "date_time_zonespec.csv" is
 used for the boost date/time library, and is nominally
 intended to be read as a data file, by boost code, and
 possibly also by Excel or similar software. Because
 the file consists of quoted Ansi character strings, it
 could also be treated like an initialization value for
 a char *str[] string array, and used via an #include.
 However, since the data lines do not end with a comma,
 the last field of each line will get compile-time
 concatenated with the first field of the next line,
 thus thwarting this usage.

 I propose that either (1) the file be changed to add a
 comma at the end of each line, or (2) the file be
 changed to add an empty "" string as an extra (dummy)
 field at the end of each line. Method (2) has the
 advantage of remaining CSV file compatible, while still
 being a valid list of quoted strings for char *str[]
 string array. The dummy zero-length string at the end
 of each line would be compile-time concatenated with
 the first field of the next line, effectively
 eliminating it.

 Method (1) has the advantage of not adding an extra
 dummy field.

 As used by the boost code, the CSV parser would have to
 be modified to simply ignore the last (dummy) field or
 the trailing comma, whichever was implemented.

 }}}

--
-- 
Ticket URL: <https://svn.boost.org/trac10/boost/ticket/596#comment:2>
Boost C++ Libraries <http://www.boost.org/>
Boost provides free peer-reviewed portable C++ source libraries.

This archive was generated by hypermail 2.1.7 : 2018-01-18 17:02:38 UTC