Hi Ssdafx,

 Thanks for the update.  I had thought that conversion of bytes to
the system character set was handled by the constructor in the
following line in GetDbfRec(int row):

       record.append(new String(strbuf)); // <- append byte array to
String Buffer

Do you think this code is not getting called for some reason?

regards,
Larry Becker

On 6/25/07, stdafx <[EMAIL PROTECTED]> wrote:


Hi Larry,

Thanks for you suggestion!

For the moment i did not found the method to convert From Mapinfo files to
FME GML format,

Now i modified the
org.geotools.dbffile.DbfFile.ParseRecordColumn sourcecode
as follows, and Everything seems Ok :)

public Object ParseRecordColumn2(String rec, int wantedCol)
        throws Exception {
        //....others
        switch (fielddef[wantedCol].fieldtype) {
         case 'C': // character
             byte[]sbs = rec.getBytes();
             byte[]targ = new byte[end-start];
             System.arraycopy(sbs, start, targ, 0, end-start);
             String mStr = new String(targ);
             return mStr;
       case 'F': // same as numeric, more or less
        //.....

}


Hi stdafx,

  SkyJUMP isn't your best choice when using a
non-english OS, but you
probably know that already.   I suspect you are
correct about the .dbf
encoding issue.  Unfortunately, I don't know a
solution either.  If
possible, you could email me a sample of the shape files
and I could
test it on my OS under a debugger, but I doubt
it would work the same.

  I'm not sure what software you are using, but is there
a way to work
around the problem by converting the MapInfo files to FME
GML format
instead?  I'm pretty sure that format wouldn't have
any problem with
the character set.

regards,
Larry Becker

On 6/24/07, stdafx  <[EMAIL PROTECTED] > wrote:
>
>
> Hi,
>
> I encountered a problem when i load a *.shp file
with SkyJUMP;
>
> In the log output window,following message is shown:
> 1 problem loading myshpfilehere.
> See View / Log for stack traces
>
>
> String index out of range: 142 (String Index Out
Of Bounds Exception)
> I checked the other thread in mailing list and i
think the problem about the
> encoding of *.dbf file,
> but i don't know how to handle it;
>
> My *.shp files were converted from Mapinfo *.tab files;
>
> I'm using windows XP simple chinese edition
>
>
> Thanks for your help!
>
> K. livy
> _______________________________________________
> jump-users mailing list
> jump-users@lists.jump-project.org
> http://lists.refractions.net/mailman/listinfo/jump-users
>
>

_______________________________________________
jump-users mailing list
jump-users@lists.jump-project.org
http://lists.refractions.net/mailman/listinfo/jump-users




--
http://amusingprogrammer.blogspot.com/
_______________________________________________
jump-users mailing list
jump-users@lists.jump-project.org
http://lists.refractions.net/mailman/listinfo/jump-users

Reply via email to