So if I understand right we should have a checkbox in the options pannel 
that makes the charset choice dialog to be displayed or not when loading 
a shape file, otherwise a default charset is chosen.

And the default checkbox setting may be to not show the dialog.

sounds like a good idea to me. What do you think Matthias?

stefan

Larry Becker wrote:
> Hi Stefan,
> 
>    Having one charset choice doesn't support multiple charsets per 
> project as the current method does.  I'm not sure how often this 
> happens, but it isn't too unusual to use datasets from multiple 
> sources.  Instead of commenting out the dialogs, it might be better to 
> have a workbench blackboard option to skip them and use the default 
> instead.
> 
>   Surely we are all going to run into an "Umlaute" or similar in our 
> data eventually.
> 
> regards,
> Larry
> 
> On Wed, Sep 8, 2010 at 6:54 PM, Stefan Steiniger <sst...@geo.uzh.ch 
> <mailto:sst...@geo.uzh.ch>> wrote:
> 
>     I like the charset choice, thanks Matthias.
> 
>     However, I wonder what users feel having every time to chose (even it is
>     only one more click) and probably not knowing what it means.
> 
>     So one thought I had is to "comment out" the dialog call and put the
>     dialog options in (a new?) options tab instead and store it the
>     blackboard? Then the currently set value is read while loading the shp
>     (i.e. exposing the option in a different way to the user).
> 
>     I know its additional work but may be more user friendly for those who
>     never care about charsets and have to load quite a bit of data during a
>     day? Like I do ;)
> 
>     Actually my co-worker just suggested the option to have a checkbox for
>     the additional dialog asking "Do you want to use that value every time".
>     so it doesn't pop up all the time during one session.
> 
>     my 2 cents...
> 
>     stefan
> 
>     Michaël Michaud wrote:
>      >   Hi Matthias,
>      >
>      >> Can you give me some information about how it is supposed to
>     work. Am I
>      >> supposed to get a panel with a charset option for any shapefile
>     loading ?
>      > Sorry for that question, I did not launch the new compiled version. I
>      > know get the charset choice dialog.
>      >
>      > Thanks,
>      >
>      > Michaël
>      >
>      >> 2) if we want to keep java 5 compatibility, you have to use new
>      >> String(byte[], int, int, String) instead of new String(byte[],
>     int, int,
>      >> Charset) on line 264
>      >>
>      >> 3) about your proposition of saving the charset in the project when
>      >> different from default jvm charset : Seems a good idea to me.
>      >>
>      >> Michaël
>      >>
>      >> Le 03/09/2010 20:34, Matthias Scholz a écrit :
>      >>> Hi,
>      >>>
>      >>> sorry my mistake. I have it only tested with open and open
>     recent ;-) In
>      >>> the SVN it is fixed for the first time, but there is a general
>     question
>      >>> and I want to hear the other developers/users. If I open a
>     shapefile
>      >>> with a special charset setting for the first time, it would be
>     logic for
>      >>> me, if we save the charset setting for this file in the
>     project. So if
>      >>> the user opens this file again with the project, the file will
>     be opened
>      >>> with the same charset.
>      >>> Should I implement this or have anyone an other suggestion?
>      >>>
>      >>> Regards
>      >>>
>      >>> Matthias
>      >>>> Nice feature, but it is going to take a little more work.  It
>      >>>> currently breaks shapefile loading from a project file and the
>      >>>> lright-click on layer legacy method "Load Dataset".  I think
>     you need
>      >>>> to set a default charset on start up.
>      >>>>
>      >>>> regards,
>      >>>>
>      >>>> Larry
>      >>>>
>      >>>> java.lang.IllegalArgumentException: Null charset name
>      >>>>       at java.nio.charset.Charset.lookup(Charset.java:430)
>      >>>>       at java.nio.charset.Charset.forName(Charset.java:503)
>      >>>>       at
>      >>>>
>     com.vividsolutions.jump.io.ShapefileReader.read(ShapefileReader.java:137)
>      >>>>       at
>      >>>>
>     
> com.vividsolutions.jump.io.datasource.DelegatingCompressedFileHandler.read(DelegatingCompressedFileHandler.java:79)
>      >>>>       at
>      >>>>
>     
> com.vividsolutions.jump.io.datasource.ReaderWriterFileDataSource$1.executeQuery(ReaderWriterFileDataSource.java:61)
>      >>>>       at
>      >>>>
>     
> com.vividsolutions.jump.io.datasource.ReaderWriterFileDataSource$1.executeQuery(ReaderWriterFileDataSource.java:79)
>      >>>>       at
>      >>>>
>     
> org.openjump.core.ui.plugin.file.open.OpenProjectWizard.executeQuery(OpenProjectWizard.java:282)
>      >>>>       at
>      >>>>
>     
> org.openjump.core.ui.plugin.file.open.OpenProjectWizard.load(OpenProjectWizard.java:271)
>      >>>>       at
>      >>>>
>     
> org.openjump.core.ui.plugin.file.open.OpenProjectWizard.loadLayers(OpenProjectWizard.java:208)
>      >>>>       at
>      >>>>
>     
> org.openjump.core.ui.plugin.file.open.OpenProjectWizard.open(OpenProjectWizard.java:152)
>      >>>>       at
>      >>>>
>     
> org.openjump.core.ui.plugin.file.open.OpenProjectWizard.open(OpenProjectWizard.java:107)
>      >>>>       at
>      >>>>
>     
> org.openjump.core.ui.plugin.file.open.OpenProjectWizard.run(OpenProjectWizard.java:99)
>      >>>>       at
>      >>>>
>     
> org.openjump.core.ui.plugin.AbstractWizardPlugin.run(AbstractWizardPlugin.java:71)
>      >>>>       at
>      >>>>
>     
> com.vividsolutions.jump.workbench.ui.task.TaskMonitorManager$TaskWrapper.run(TaskMonitorManager.java:151)
>      >>>>       at java.lang.Thread.run(Thread.java:619)
>      >>>>
>      >>>> On Fri, Sep 3, 2010 at 4:46 AM, Matthias
>     Scholz<m...@jammerhund.de <mailto:m...@jammerhund.de>
>      >>>> <mailto:m...@jammerhund.de <mailto:m...@jammerhund.de>>>   wrote:
>      >>>>
>      >>>>       Hi,
>      >>>>
>      >>>>       I've commited some little changes for selecting an other
>     charset while
>      >>>>       opening an ESRI shapefile.
>      >>>>       Thank you Michael and Stefan for your hints to the
>     wizard framework.
>      >>>>       Thereby the code changes was very small and consitent
>     :-) On the other
>      >>>>       hand Michael is right with his opinion about the wizard
>     framework.
>      >>>>       Without good documentation you need many hours to
>     understand and
>      >>>>       implement such options for file loading.
>      >>>>       Please take a look at my changes and tell me your opinion.
>      >>>>       In the language files (en and de) I've added a
>      >>>>       "org.openjump.core.ui.plugin.file.charset" key.
>      >>>>
>      >>>>       Regards
>      >>>>
>      >>>>       Matthias
>      >>>>       >     Le 30/08/2010 18:50, Stefan Steiniger a écrit :
>      >>>>       >
>      >>>>       >>   Hei,
>      >>>>       >>
>      >>>>       >>   not sure, but wasn't the idea of the wizard that
>     several
>      >>>>       dialogs can be
>      >>>>       >>   displayed after each other?
>      >>>>       >>
>      >>>>      
>     
> http://sourceforge.net/apps/mediawiki/jump-pilot/index.php?title=How_to_Create_an_Open_Wizard
>      >>>>       >>
>      >>>>       >   You're right Stefan, this is the idea of this wizard
>      >>>>       >
>      >>>>       >>   wouldn't that work for you too?
>      >>>>       >>
>      >>>>       >   I found it was not very easy to use the wizard
>     framework to add
>      >>>>       options
>      >>>>       >   to an open file dialog box, but I think this is the
>     way to go if
>      >>>>       we want
>      >>>>       >   to have something consistent in OpenJUMP
>      >>>>       >
>      >>>>       >>   Though I am not sure which loader uses that option
>     currently.
>      >>>>       But it
>      >>>>       >>   looks like the "WMS Layer" option does that. (you
>     see not a
>      >>>>       "finish" but
>      >>>>       >>   a "next" button)
>      >>>>       >>
>      >>>>       >   I used it to make a text/csv/wkt format driver with
>     some options.
>      >>>>       >   You can also find my code here :
>      >>>>       >
>      >>>>      
>     
> http://geo.michaelm.free.fr/OpenJUMP/resources/drivers/txt-driver-src-0.2.1.zip
>      >>>>       >
>      >>>>       >   Michaël
>      >>>>       >
>      >>>>       >>   stefan
>      >>>>       >>
>      >>>>       >>   Sunburned Surveyor wrote:
>      >>>>       >>
>      >>>>       >>>   I don't see any problems with your approach. Is
>     the idea to
>      >>>>       allow the
>      >>>>       >>>   charset of the shapefile to be selected from the
>     new JComboBox?
>      >>>>       >>>
>      >>>>       >>>   Landon
>      >>>>       >>>
>      >>>>       >>>   On Sat, Aug 28, 2010 at 3:03 AM, Matthias
>      >>>>       Scholz<m...@jammerhund.de
>     <mailto:m...@jammerhund.de><mailto:m...@jammerhund.de
>     <mailto:m...@jammerhund.de>>>    wrote:
>      >>>>       >>>
>      >>>>       >>>>   Hi,
>      >>>>       >>>>
>      >>>>       >>>>   in the last few weeks i had some problems with
>     different
>      >>>>       charsets in
>      >>>>       >>>>   shape/dbf files. In the openjump.bat or
>     openjump.sh file I
>      >>>>       have inserted
>      >>>>       >>>>   the java system property "file.encoding=...". My
>     problems are
>      >>>>       the german
>      >>>>       >>>>   "Umlaute" in the attributes.
>      >>>>       >>>>   I would like to add a JComboBox to the
>      >>>>       >>>>  
>     org.openjump.core.ui.plugin.file.open.SelectFilesPanel.
>      >>>>       Because the
>      >>>>       >>>>   SelectFilesPanel extends  JFileChooser I don't
>     know any
>      >>>>       possibility to
>      >>>>       >>>>   add any other widget. I would prefer to change
>      >>>>       >>>>
>      >>>>       >>>>   public class SelectFilesPanel extends
>     JFileChooser implements
>      >>>>       WizardPanel
>      >>>>       >>>>
>      >>>>       >>>>   to
>      >>>>       >>>>
>      >>>>       >>>>   public class SelectFilesPanel extends JPanel
>     implements
>      >>>>       WizardPanel
>      >>>>       >>>>
>      >>>>       >>>>   then add the JFileChooser and a JComboBox to the
>     JPanel. I
>      >>>>       don't know if
>      >>>>       >>>>   this have impacts to other classes? Before I
>     start to code, I
>      >>>>       would like
>      >>>>       >>>>   to hear from the other developers.
>      >>>>       >>>>
>      >>>>       >>>>
>      >>>>       >>>>   Regards
>      >>>>       >>>>
>      >>>>       >>>>   Matthias
>      >>>>       >>>>
>      >>>>       >>>>
>      >>>>      
>     
> ------------------------------------------------------------------------------
>      >>>>       >>>>   Sell apps to millions through the Intel(R)
>     Atom(Tm) Developer
>      >>>>       Program
>      >>>>       >>>>   Be part of this innovative community and reach
>     millions of
>      >>>>       netbook users
>      >>>>       >>>>   worldwide. Take advantage of special opportunities to
>      >>>>       increase revenue and
>      >>>>       >>>>   speed time-to-market. Join now, and jumpstart
>     your future.
>      >>>>       >>>>   http://p.sf.net/sfu/intel-atom-d2d
>      >>>>       >>>>   _______________________________________________
>      >>>>       >>>>   Jump-pilot-devel mailing list
>      >>>>       >>>>   Jump-pilot-devel@lists.sourceforge.net
>     <mailto:Jump-pilot-devel@lists.sourceforge.net>
>      >>>>       <mailto:Jump-pilot-devel@lists.sourceforge.net
>     <mailto:Jump-pilot-devel@lists.sourceforge.net>>
>      >>>>       >>>>  
>     https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel
>      >>>>       >>>>
>      >>>>       >>>>
>      >>>>       >>>
>      >>>>      
>     
> ------------------------------------------------------------------------------
>      >>>>       >>>   Sell apps to millions through the Intel(R)
>     Atom(Tm) Developer
>      >>>>       Program
>      >>>>       >>>   Be part of this innovative community and reach
>     millions of
>      >>>>       netbook users
>      >>>>       >>>   worldwide. Take advantage of special opportunities
>     to increase
>      >>>>       revenue and
>      >>>>       >>>   speed time-to-market. Join now, and jumpstart your
>     future.
>      >>>>       >>>   http://p.sf.net/sfu/intel-atom-d2d
>      >>>>       >>>   _______________________________________________
>      >>>>       >>>   Jump-pilot-devel mailing list
>      >>>>       >>>   Jump-pilot-devel@lists.sourceforge.net
>     <mailto:Jump-pilot-devel@lists.sourceforge.net>
>      >>>>       <mailto:Jump-pilot-devel@lists.sourceforge.net
>     <mailto:Jump-pilot-devel@lists.sourceforge.net>>
>      >>>>       >>>  
>     https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel
>      >>>>       >>>
>      >>>>       >>>
>      >>>>       >>>
>      >>>>       >>
>      >>>>      
>     
> ------------------------------------------------------------------------------
>      >>>>       >>   This SF.net Dev2Dev email is sponsored by:
>      >>>>       >>
>      >>>>       >>   Show off your parallel programming skills.
>      >>>>       >>   Enter the Intel(R) Threading Challenge 2010.
>      >>>>       >>   http://p.sf.net/sfu/intel-thread-sfd
>      >>>>       >>   _______________________________________________
>      >>>>       >>   Jump-pilot-devel mailing list
>      >>>>       >>   Jump-pilot-devel@lists.sourceforge.net
>     <mailto:Jump-pilot-devel@lists.sourceforge.net>
>      >>>>       <mailto:Jump-pilot-devel@lists.sourceforge.net
>     <mailto:Jump-pilot-devel@lists.sourceforge.net>>
>      >>>>       >>  
>     https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel
>      >>>>       >>
>      >>>>       >>
>      >>>>       >>
>      >>>>       >
>      >>>>       >
>      >>>>       >
>      >>>>      
>     
> ------------------------------------------------------------------------------
>      >>>>       >   This SF.net Dev2Dev email is sponsored by:
>      >>>>       >
>      >>>>       >   Show off your parallel programming skills.
>      >>>>       >   Enter the Intel(R) Threading Challenge 2010.
>      >>>>       >   http://p.sf.net/sfu/intel-thread-sfd
>      >>>>       >   _______________________________________________
>      >>>>       >   Jump-pilot-devel mailing list
>      >>>>       >   Jump-pilot-devel@lists.sourceforge.net
>     <mailto:Jump-pilot-devel@lists.sourceforge.net>
>      >>>>       <mailto:Jump-pilot-devel@lists.sourceforge.net
>     <mailto:Jump-pilot-devel@lists.sourceforge.net>>
>      >>>>       >  
>     https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel
>      >>>>       >
>      >>>>
>      >>>>
>      >>>>      
>     
> ------------------------------------------------------------------------------
>      >>>>       This SF.net Dev2Dev email is sponsored by:
>      >>>>
>      >>>>       Show off your parallel programming skills.
>      >>>>       Enter the Intel(R) Threading Challenge 2010.
>      >>>>       http://p.sf.net/sfu/intel-thread-sfd
>      >>>>       _______________________________________________
>      >>>>       Jump-pilot-devel mailing list
>      >>>>       Jump-pilot-devel@lists.sourceforge.net
>     <mailto:Jump-pilot-devel@lists.sourceforge.net>
>      >>>>       <mailto:Jump-pilot-devel@lists.sourceforge.net
>     <mailto:Jump-pilot-devel@lists.sourceforge.net>>
>      >>>>      
>     https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel
>      >>>>
>      >>>>
>      >>>>
>     ------------------------------------------------------------------------
>      >>>>
>      >>>>
>     
> ------------------------------------------------------------------------------
>      >>>> This SF.net Dev2Dev email is sponsored by:
>      >>>>
>      >>>> Show off your parallel programming skills.
>      >>>> Enter the Intel(R) Threading Challenge 2010.
>      >>>> http://p.sf.net/sfu/intel-thread-sfd
>      >>>>
>     ------------------------------------------------------------------------
>      >>>>
>      >>>> _______________________________________________
>      >>>> Jump-pilot-devel mailing list
>      >>>> Jump-pilot-devel@lists.sourceforge.net
>     <mailto:Jump-pilot-devel@lists.sourceforge.net>
>      >>>> https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel
>      >>>>
>      >>>
>     
> ------------------------------------------------------------------------------
>      >>> This SF.net Dev2Dev email is sponsored by:
>      >>>
>      >>> Show off your parallel programming skills.
>      >>> Enter the Intel(R) Threading Challenge 2010.
>      >>> http://p.sf.net/sfu/intel-thread-sfd
>      >>> _______________________________________________
>      >>> Jump-pilot-devel mailing list
>      >>> Jump-pilot-devel@lists.sourceforge.net
>     <mailto:Jump-pilot-devel@lists.sourceforge.net>
>      >>> https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel
>      >>>
>      >>>
>      >>
>     
> ------------------------------------------------------------------------------
>      >> This SF.net Dev2Dev email is sponsored by:
>      >>
>      >> Show off your parallel programming skills.
>      >> Enter the Intel(R) Threading Challenge 2010.
>      >> http://p.sf.net/sfu/intel-thread-sfd
>      >> _______________________________________________
>      >> Jump-pilot-devel mailing list
>      >> Jump-pilot-devel@lists.sourceforge.net
>     <mailto:Jump-pilot-devel@lists.sourceforge.net>
>      >> https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel
>      >>
>      >>
>      >
>      >
>      >
>     
> ------------------------------------------------------------------------------
>      > This SF.net Dev2Dev email is sponsored by:
>      >
>      > Show off your parallel programming skills.
>      > Enter the Intel(R) Threading Challenge 2010.
>      > http://p.sf.net/sfu/intel-thread-sfd
>      > _______________________________________________
>      > Jump-pilot-devel mailing list
>      > Jump-pilot-devel@lists.sourceforge.net
>     <mailto:Jump-pilot-devel@lists.sourceforge.net>
>      > https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel
>      >
>      >
> 
>     
> ------------------------------------------------------------------------------
>     This SF.net Dev2Dev email is sponsored by:
> 
>     Show off your parallel programming skills.
>     Enter the Intel(R) Threading Challenge 2010.
>     http://p.sf.net/sfu/intel-thread-sfd
>     _______________________________________________
>     Jump-pilot-devel mailing list
>     Jump-pilot-devel@lists.sourceforge.net
>     <mailto:Jump-pilot-devel@lists.sourceforge.net>
>     https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel
> 
> 
> 
> ------------------------------------------------------------------------
> 
> ------------------------------------------------------------------------------
> This SF.net Dev2Dev email is sponsored by:
> 
> Show off your parallel programming skills.
> Enter the Intel(R) Threading Challenge 2010.
> http://p.sf.net/sfu/intel-thread-sfd
> 
> 
> ------------------------------------------------------------------------
> 
> _______________________________________________
> Jump-pilot-devel mailing list
> Jump-pilot-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel

------------------------------------------------------------------------------
This SF.net Dev2Dev email is sponsored by:

Show off your parallel programming skills.
Enter the Intel(R) Threading Challenge 2010.
http://p.sf.net/sfu/intel-thread-sfd
_______________________________________________
Jump-pilot-devel mailing list
Jump-pilot-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel

Reply via email to