View Full Version : Lazarus, Mac, and Text files. Just some questions

30-11-2007, 11:59 AM
To anyone thats using Lazarus on Mac, I have what is probably a dumb question: Is there a problem reading/writing plain text (xml actually) files and utilizing them between Mac's, Windows, and Linux boxes?

I know that the whole Big/Little Indian thing comes up when dealing with Binary data, but is this a problem with text files at all?

The reason I ask is I have an app that I've been working on for a while that currently runs on Windows and Linux just fine. I was asked if a Mac version could be produced and what it would cost to do so. I don't have a Mac, though my work has plenty I could "borrow", and have never tried to build something on a Mac. The project is currently coded in Lazarus and utilizes XML for project files.

Any help/guidance greatly appreciated :)

30-11-2007, 01:55 PM
If your app is supposed to run on an Intel box, then endianess should not be a problem. If you have to create a Universal binary that runs on both Intel and PowerPC, then I think you may have to, but I can't say for sure as I only have an Intel MacBook.

03-12-2007, 12:47 PM
Its not the binaries I'm worried about, but the text files. As I said, I know this sounds stupid, but its an honest question :). I guess if nothing else I can always write a header and read it in, if it doesn't match try flipping the bit and comparing again, if a match then its an Indian switch file, if not its not a valid project file.

03-12-2007, 07:23 PM
With text it's every byte thats a character so I don't think endian-ness plays a role. hmm... endian-ness... :eh:

The only issue I think you'd face is having an ANSI encoded text file instead of an ASCII encoded text file, but this is mostly common between the 'Linux house' and 'Windows house' of which I believe MacOS X would fall into the Linux category.

Not a direct answer, but I doubt that the question was meant to have had one delivered. ;)