Skip to content

Conversation

@karthikbekalp
Copy link
Contributor

What was the problem/requirement? (What/Why)

Cinema 4D submissions fail to run if filenames contain non-ASCII values. For example, a scene file named TestSceneñ.c4d would not render.

openjd_fail: Error encountered while starting adaptor:
Cinema4D Encountered an Error: FileNotFoundError: The scene file 'C:\some_path\TestñSceneñ.c4d' does not exist

What was the solution? (How)

While loading the JSON/YAML files, the default open() uses system's encoding standard which is not UTF-8.
This causes issues in other DCCs when they try to read the data.

What is the impact of this change?

This is not a full fix but a partial fix. Even after adding this change we will have few issues with logging that also uses default encoding and not "utf-8". The fix for that issue is currently in progress.

How was this change tested?

While renders now work for characters like

  • Symbols like for Bitcoin ₿
  • Latin character ę
  • Greek character β
  • Cyrillic Б
  • and many more

Screenshot 2024-12-19 at 3 44 55 PM

They still fail for emoji and some mathematical operators. Cinema 4D's load document function returns None without details on why it fails.

Additionally, it also fails for the Latin character ñ while logging which is currently being investigated.

  • Have you run the unit tests?

Yes

Was this change documented?

Yes.

Is this a breaking change?

I discussed this with @AWS-Samuel and considering the packages are public, we have to operate under the assumption that customers are using the packages in their own, potentially private integrations. So even if we handle the change gracefully in all our integrations its still a breaking change.

If so, then please describe the changes that users of this package must make to update their scripts, or Python applications.

Users of this package must update their dependent packages to ensure that they use "UTF-8" encoding as well.

Does this change impact security?

  • Does the change need to be threat modeled? For example, does it create or modify files/directories that must only be readable by the process owner?
    No
    • If so, then please label this pull request with the "security" label. We'll work with you to analyze the threats.

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@karthikbekalp karthikbekalp requested a review from a team as a code owner December 19, 2024 22:09
@sonarqubecloud
Copy link

@karthikbekalp
Copy link
Contributor Author

Discussed this further and looks like there are other places to fix as well. I'll try updating all of them and testing. I will create a new PR with the changes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant