Skip to content

Conversation

@fernewelten
Copy link
Contributor

Fixes #2909

Allow UTF-8 byte sequences within single quotes. This is equivalent to the codepoint of the respective byte sequence.

Typical code:

String utfText = "Test";
utfText = utfText.AppendChar('👹'); // → utfText.AppendChar(128121)

I'm taking this as an opportunity to refactor the code a bit by inlining and then killing cc_parse() and cc_scan(). (Both functions had been reserved for internal use in googletests.)

Scanner accepts '…' containing a byte sequence that specifies a Unicode code point in  utf8 format. Result is the code point. Only when scanner is created with the newly created parameter 'use_utf8' set to true.

Inline calls to 'cc_parse()' and 'cc_scan()', kill those functions.
@ivan-mogilko ivan-mogilko merged commit abd2efa into adventuregamestudio:ags4 Nov 11, 2025
24 checks passed
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.

2 participants