[OSM-dev] Changeset files (was Removing Minutely and Hourly Changesets)
Jon Burgess
jburgess777 at googlemail.com
Mon Dec 21 11:44:53 GMT 2009
On Mon, 2009-12-21 at 01:08 -0500, Anthony wrote:
> Cool. If anyone familiar with the planet dumper tool is listening...
>
> In
> http://svn.openstreetmap.org/applications/utils/planet.osm/C/output_osm.c
>
> } else if ((*in >= 0) && (*in < 32)) {
> escape_tmp[len] = '?';
> len++;
>
> should be something like
>
> } else if ((*in > 0) && (*in < 32)) {
> len+=sprintf(&escape_tmp[len], "&#%d;", *in);
>
> "Something like" as in I haven't even checked if that compiles :).
Most of the control characters are not allowed in a valid XML file. It
makes no difference whether they are present as an ASCII character or as
the equivalent entity.
$ echo "<foo></foo>" | xmllint -format -
-:1: parser error : xmlParseCharRef: invalid xmlChar value 1
<foo></foo>
> Of course, another thing to consider is that 1024 bytes isn't enough
> for the truly pathological cases. I think you need like 1531 or
> something to handle that. Fixing this might be enough to properly
> process the current db, though.
How do you arrive at the 1531 number?
> Any chance of adding num_changes?
The current output reflects the same information as the /changeset API
call. Do you think it should be there too?
Jon
More information about the dev
mailing list