OGR WRAP character

Frank Warmerdam fwarmerdam at GMAIL.COM
Fri Jul 8 11:11:51 EDT 2005


On 7/8/05, Daniel Morissette <dmorissette at dmsolutions.ca> wrote:
> Frank Warmerdam wrote:
> >
> > My first thought is that the MITAB driver should not be turning char-10
> > into escaped \n format.  The \n character is legal (though possibly
> > occationally a nuicance) in attribute values and I don't think most other
> > drivers fool with special characters like this.
> >
> 
> So should I take this as a clear statement that it is okay (and actually
> the recommended way) for an OGR driver to return strings with
> non-printable characters in them? I guess that was my main question
> before making a decision on what to do about the specific problem
> between MITAB and MapServer.

Daniel, 

If the source has unprintable characters, then it is OK to return them
in OGR attribute values.  Stricter rules might apply to things like
attribute names. 
 
> > Since Daniel "owns" MITAB you guys are welcome go ahead to a
> > change to the behavior if you are comfortable with it, though it might
> > be nice to raise the issue on the mitab mailing list.
> >
> 
> Still not sure what to propose for MITAB: MIF files contain '\' + 'n',
> so that's what users of the lib are likely to expect. If MIF files
> return one thing and TAB files return a different thing then that means
> applications using MITAB need to handle both cases in a different way
> which is ugly. Changing the behavior to return ASCII-10 even in the MIF
> case may be the way to go, I'll have to dig and try to figure out why I
> bothered implementing this escaping in the first place.  yuck!

Ah.  I had missed that mid/mif and tab were different in this regard.
I think it would wise to treat the \n encoding in mid/mif as a format
specific escaping convention and transform into char-10 within OGR. 

Best regards,
-- 
---------------------------------------+--------------------------------------
I set the clouds in motion - turn up   | Frank Warmerdam, warmerdam at pobox.com
light and sound - activate the windows | http://pobox.com/~warmerdam
and watch the world go round - Rush    | Geospatial Programmer for Rent



More information about the mapserver-dev mailing list