When using the RedCloth gem under Ruby on Rails in a Docker container on an Apple M1 system, the string get truncated just before the first non-ascii character. The problem does not happen on an Apple Intel system or if Rails is run outside of Docker. This GitHub repo should reproduce the issue on any Apple M1 hardware:
https://github.com/mo-nathan/docker-test
I'm guessing it has something to do with how the standard ruby Docker images are getting created for Apple M1s. I've tried tracing the issue using a Ruby debugger, but haven't found any additional clues.