MacGregor, Duncan (GE Infra, Energy) wrote:
> 
> 
> Or in fact any strings written using a different codepage to the current 
> windows one.
> 
> How should I determine the codepage/locale to use when reading a file 
> I'm sure I must be missing something obvious here but I can't seem to 
> find a way to do this from Mitab.
> 

MITAB doesn't do anything special to handle different character 
encodings. It reads the "charset" line from the MIF and TAB headers but 
doesn't do anything with it (I just realized it's not even exposed 
through a public method of the TABFile class). When writing files, it 
always defaults to using charset "Neutral". Methods to get/set the 
charset could be an interesting feature to have so you could possibly 
create a enhancement bug for that in the MITAB bugzilla.

Until methods are available, you can easily open the .tab file in text 
mode and look for the "charset" line in the header. e.g.

!table
!version 300
!charset WindowsLatin1

There is a similar charset header in the .mif file.

Daniel
-- 
Daniel Morissette
http://www.mapgears.com/





 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/mitab/

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 


Reply via email to