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

[3.x] File: Re-add support to skip CR (\r) in File::get_as_text #63745

Merged
merged 1 commit into from
Aug 1, 2022

Conversation

akien-mga
Copy link
Member

This was removed in #63481, and we confirmed that it's better like this,
but we add back the possibility to strip CR as an option, to optionally
restore the previous behavior.

For performance this is done directly in String::parse_utf8.

Also fixes Android FileAccess::get_line() as this one should strip CR.

3.x backport of #63733.

@akien-mga akien-mga added this to the 3.5 milestone Jul 31, 2022
@akien-mga akien-mga requested review from m4gr3d and bruvzg July 31, 2022 21:40
@akien-mga akien-mga requested review from a team as code owners July 31, 2022 21:40
@akien-mga akien-mga force-pushed the 3.x-file-get_as_text-skip-CR branch 3 times, most recently from a4543a7 to 92ed327 Compare July 31, 2022 22:33
This was removed in godotengine#63481, and we confirmed that it's better like this,
but we add back the possibility to strip CR as an option, to optionally
restore the previous behavior.

For performance this is done directly in `String::parse_utf8`.

Also fixes Android `FileAccess::get_line()` as this one _should_ strip CR.

Supersedes godotengine#63717.

(cherry picked from commit 1418f97)
@akien-mga akien-mga force-pushed the 3.x-file-get_as_text-skip-CR branch from 92ed327 to 751b16a Compare July 31, 2022 22:41
@akien-mga akien-mga merged commit 9d0d9ff into godotengine:3.x Aug 1, 2022
@akien-mga akien-mga deleted the 3.x-file-get_as_text-skip-CR branch August 1, 2022 05:54
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.

2 participants