WIP-pyshapelib-Unicode issues

Bernhard Reiter bernhard at intevation.de
Wed Jan 9 19:54:55 CET 2008


On Wednesday 09 January 2008 18:52, Bram de Greve wrote:
> >> This should be
> >> configurable by the user, but I don't really know where to start.  Can
> >> anyone who's familier with the Thuban UI give a headstart?
> >>    
> >
> > First we have to decide where to save this property.
> >  
>
> Is there any "config" file for Thuban?  If so, I would save it there.

This would be only suitable if it is a global option,
but if I add a few shapefiles, they could come from different sources
and have different encoding in the dbf files.
Thus this looks like at least a property per layer.

Thuban has a ~/.thubn/thubanstart.py file and the sessions files usually 
contain all the information necessary to reload a set of layers.

> > It looks like the property of a .dbf table which can be a table on its
> > own or a part of a shapefile layer.
> >  
> Correct.
>
> > If Thuban displays a table it will already have a concept about it's
> > encoding. Otherwise it would need to recode it.
> > So for files where Thuban cannot determine the encoding, we probably have
> > to add something like in the "import" statements.
> >  
>
> Good point! I totally missed the issue of dbf files that do not have any
> code page associated.  Until now, I simply assumed cp1252.
> But that's not the only reason the have this encoding configurable.

> More important is the encoding to be used when _creating_ new dbf files!

Yes, this would be the export possibilities from the table view dialog.

> > Maybe the table view should also display this property.
> 
> That would be nice, though not really necessary.

If it is not in the shapefile and cannot be reliably detected means the user
must change it and it needs to be saved in the session file so it comes up
again as the user wanted it to be. I think adding a display and button to the 
table view is a good approach.

Bernhard

-- 
Managing Director - Owner: www.intevation.net       (Free Software Company)
Germany Coordinator: fsfeurope.org. Coordinator: www.Kolab-Konsortium.com.
Intevation GmbH, Osnabrück, DE; Amtsgericht Osnabrück, HRB 18998
Geschäftsführer Frank Koormann, Bernhard Reiter, Dr. Jan-Oliver Wagner
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://www.intevation.de/pipermail/thuban-devel/attachments/20080109/8dc050f0/attachment.bin


More information about the Thuban-devel mailing list

This site is hosted by Intevation GmbH (Datenschutzerklärung und Impressum | Privacy Policy and Imprint)