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

Revise Ren-C's rules for CR and 0 bytes in strings #1055

Merged
merged 1 commit into from Mar 2, 2020
Merged

Revise Ren-C's rules for CR and 0 bytes in strings #1055

merged 1 commit into from Mar 2, 2020

Conversation

hostilefork
Copy link
Member

This commit tries to build on Rebol's historical concept of unifying
strings within the system to use LF-only. But rather than try "magic"
to filter out CR LF sequences (and "magically" put them back later), it
adds in speedbumps to try and stop CR from casually getting into
strings. Then it encourages active involvement at the source level
with functions like ENLINE and DELINE when a circumstance can't be
solved by standardizing the data sources themselves:

https://forum.rebol.info/t/1264

It also revises Ren-C's rules to be prescriptive about disallowing 0
bytes in strings, to more safely use the rebSpell() API, which only
returns a pointer and must interoperate with C. It enforces the use of
BINARY! if you want to embed 0 bytes (and using the rebBytes() API,
which always returns a size.)

This commit tries to build on Rebol's historical concept of unifying
strings within the system to use LF-only.  But rather than try "magic"
to filter out CR LF sequences (and "magically" put them back later), it
adds in speedbumps to try and stop CR from casually getting into
strings.  Then it encourages active involvement at the source level
with functions like ENLINE and DELINE when a circumstance can't be
solved by standardizing the data sources themselves:

https://forum.rebol.info/t/1264

It also revises Ren-C's rules to be  prescriptive about disallowing 0
bytes in strings, to more safely use the rebSpell() API, which only
returns a pointer and must interoperate with C.  It enforces the use of
BINARY! if you want to embed 0 bytes (and using the rebBytes() API,
which always returns a size.)
@hostilefork hostilefork merged commit acf76ed into metaeducation:master Mar 2, 2020
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.

None yet

1 participant