Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9099879
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T00:43:45+00:00 2026-06-17T00:43:45+00:00

I want to write a cross platform file IO utility using POSIX. I was

  • 0

I want to write a cross platform file IO utility using POSIX. I was wondering if a file I wrote on Windows could be moved to OS X (via email or a thumbdrive) and still appear to contain the exact same content? And how about if I moved a file from OS X to Windows?

Also, are there any weird UTF-8 anomalies on either platform that I should be aware of when writing strings to this file?

This question is to be answered only for newer Macs, not the PowerPC Macs. I just want to make sure that all the endianness and related byte ordering problems died with PowerPC.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-17T00:43:46+00:00Added an answer on June 17, 2026 at 12:43 am

    If your POSIX code uses the ‘binary’ flag when opening the file for writing, and both machines have the same endianness (which is true for modern Intel-based Macs and Intel-based Windows PCs), then yes, files should be byte-for-byte identical.

    As for UTF-8, the main thing to be aware of is that in general, Windows prefers pre-composed characters (“normalisation form NFC”) while Mac OS prefers de-composed characters (“normalisation form NFD”). That is, Windows will encode “é” as U+00E9 LATIN SMALL LETTER E WITH ACUTE, while Mac OS will encode it as U+0065 LATIN SMALL LETTER E followed by U+0301 COMBINING ACUTE ACCENT. Obviously both OSs will render both sequences the same way, but I believe this affects characters entered by the user, or read from filenames on-disk.

    As for endianness-related problems dying with PowerPC, that’s not strictly true. ARM at least can operate in either endianness, and while, say, iOS tends to use little-endian (to match Intel), other OSs might run in big-endian mode, and some (such as Linux) can be compiled either way. Wikipedia doesn’t mention which endianness Android devices typically use.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

How can I write two simple cross platform (Linux, Windows) functions for reading text
I write cross-platform software, so I like my Windows environment to be Un*x-like (I'm
I am using C++ ofstream to write out a file. I want to set
I want to write a file on my iPhone app. My file is in
I am using fopen to write to a binary file and using the cstdio
I'm in the process of implementing a cross-platform (Mac OS X, Windows, and Linux)
I am wanting to write some cross-platform library code. I am creating a library
I need some idea how to write a C++ cross platform implementation of a
I am writing a cross platform program. I want this one program to run
I'm designing some cross platform tool, and I want to store some read only

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.