Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Cocoa clipboard handler to replace Carbon/SDL2 handlers for Mac OS. #295

Merged
merged 7 commits into from Apr 3, 2021

Conversation

AliceLR
Copy link
Owner

@AliceLR AliceLR commented Apr 1, 2021

This adds a Cocoa clipboard handler to directly access the clipboard instead of relying on the Carbon (discontinued) or SDL2 (expects a UTF-8 encoded input) handlers. Note this hasn't really been tested on older Macs yet so I'm not sure if replacing the Carbon handler entirely with it is a good idea.

Mac OS Roman encoding is used for the clipboard data because it seems to be the only easily supported text encoding that can have all 256 codepoints cleanly converted to/from UTF-8. ISO Latin-1 and Windows 1292, for example, have issues with various codepoints in the 128-159 range.

Fixes this issue.

  • Don't use array literals (LLVM 3.1).
  • Don't use autoreleasepool (LLVM 3.0).
  • More testing.
  • iMac testing: Snow Leopard.
  • iMac testing: pre-10.6 implementation.
  • iMac testing: PPC toolchain/DMG.
  • Actual testing of that DMG on a real PowerPC Mac..
  • Xcode project?
  • Check into linking warnings about stub files and library files being out of sync (probably a configuration error on my end). Exporting SDKROOT in ~/.profile fixed this issue.

@AliceLR AliceLR added the bug label Apr 1, 2021
@AliceLR AliceLR added this to the 2.93 milestone Apr 1, 2021
@AliceLR AliceLR merged commit 25f90e6 into master Apr 3, 2021
@AliceLR AliceLR deleted the cocoa-clipboard-fix branch April 3, 2021 00:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant