Problem with perl read visual foxpro dbf using Python

Asked By 20 points N/A Posted on -
qa-featured

I can’t read by Perl read visual FoxPro dbf file with CodePage cp874 data using Python because I am the Python programmer.

Can I find the suggestion on the UNICODE side of Python, because it seems to me that currently it complains about missing CodePage mappings.

Or what is the matter?

SHARE
Answered By 0 points N/A #165724

Problem with perl read visual foxpro dbf using Python

qa-featured

Hello,

Probably you are using the file name more than once, without saving the results first, meaning that you are creating several links assigned to the same file, and maybe that's why the page cannot be run, hereunder you could find short example on Python and Perl:

 

from dbf import *
a_data = ("a.dbf")
with a_data:
    for rec in a_data:
        print rec

 

<pre>
from dbf import *
print Table("book.dbf")
for rec in Table("book.dbf"):
        print rec
</pre>

I would suggest using unichr(), it's built in function. Witch convert the integers into Unicode string that contains the corresponding code point, to switch it back you might use ord().

For searching and formatting (Operations type) you might use 8-bit string type, instance of the Unicode type.

Regards,

Nilenio

Related Questions