英文:
Hex to dec misunderstanding
问题
I'm trying to get clear with dbf file structure.
我试图理清dbf文件的结构。
I read that
我读到过
offset 4 - 7 Number of records
偏移 4 - 7 记录数
I opened random dbf file with 10148 rows in hex editor and here is offset:
我在十六进制编辑器中打开了一个随机的dbf文件,有10148行,这里是偏移量:
A4 27 00 00
I try to convert it to dec. Online converter says: 42023
我尝试将其转换为十进制。在线转换器显示:42023
But my hex editor shows 10148
但我的十六进制编辑器显示10148
I tried to reverse conversion and online converter said that
我尝试进行反向转换,在线转换器显示:
10148 = 27 A4
Byte order is reversed
字节顺序被颠倒了
I think that there is about Big And little endian byte order.
我认为这涉及到大端和小端字节顺序的问题。
The question is how to define which order is used in offset?
问题是如何确定在偏移量中使用了哪种字节顺序?
英文:
I`m trying to get clear with dbf file structure.
I read that
> offset 4 - 7 Number of records
I opened random dbf file with 10148 rows in hex editor and here is offset:
> A4 27 00 00
I try to convert it to dec. Online converter says: 42023
But my hex editor shows 10148
I tried to reverse conversion and online converter said that
> 10148 = 27 A4
Byte order is reversed
I think that there is about Big And little endian byte order.
The question is how to define which order is used in offset?
答案1
得分: 1
dBASE最初是为使用8086系列小端处理器的MS/DOS开发的。据我所知,dbf文件中的任何(数字)字段,包括偏移量,都一致使用小端字节顺序。但我必须承认我没有找到任何关于这方面的参考资料...
英文:
dBASE was originaly produced for MS/DOS using the 8086 serie little endian processor. AFAIK, the byte order is consistently little endian in any (numeric) field of a dbf file including offsets.. But I must admit I could not find any reference for that...
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论