billroper: (Default)
[personal profile] billroper
The set of Java classes that I'm working on are not yet complete, but I was able to read a chunk of the old binary file format successfully today. Of course, this required fixing a bunch of little buglets.

For example, Unicode characters on an Intel box in C++ are stored in little endian format. In Java, Unicode characters are stored in big endian format. All of the stored binary strings have to have bytes flipped both inbound and outbound. Also, Java does not have unsigned primitive types and the legacy binary format that I'm using makes extensive use of unsigned math when reading the data.

All of this makes life exciting. :)

Date: 2013-11-02 04:22 pm (UTC)
From: [identity profile] whl.livejournal.com
If it's UTF-16, the unicode should have a Byte Order Mark. On Windows, even UTF-8 sometimes gets a Byte Order Mark, although that is actually a bug...

Date: 2013-11-02 04:43 pm (UTC)
From: [identity profile] whl.livejournal.com
That was the transitional multibyte Microsoft format, right? That's what I hate when I have to work in Windows; all the different string formats. On Mac, we mostly only have two.

Profile

billroper: (Default)
billroper

February 2026

S M T W T F S
1 2 3 4 5 6 7
8 9 10 11 12 13 14
15 16 17 18 19 20 21
22 23 24 25 26 27 28

Most Popular Tags

Style Credit

Expand Cut Tags

No cut tags
Page generated Mar. 1st, 2026 08:59 pm
Powered by Dreamwidth Studios