Open sl-service-account opened 1 year ago
Maestro Linden commented at 2023-02-13T18:27:20Z
Thanks for the report, Kinki - we can reproduce the issue. In general, this bug seems to be about multi-byte unicode characters inside a bracketed ([]
) search pattern. With your test script, if you instead use pattern = "(⧟➞◈)|(⧟A◈)"
then both keys are found.
What just happened?
llLinksetDataFindKeys() will not find all keys when a character set in a pattern contains certain characters.
Example characters: ▢(U+25A2) and ➞(U+25BB)
What were you doing when it happened?
To reproduce: 1) Create an object 2) Add script below 3) Notice output returns only one key
What were you expecting to happen instead?
Both keys should be return. If the ➞(U+25BB) character is replaced with the letter 'B' in the script, both keys will be returned. Also the character ➞(U+25BB) will work correctly in the pattern if it is not part of a character set.
Other information
Original Jira Fields
| Field | Value | | ------------- | ------------- | | Issue | BUG-233363 | | Summary | llLinksetDataFindKeys() fails to find keys if the pattern contains certain characters inside a character set | | Type | Bug | | Priority | Unset | | Status | Accepted | | Resolution | Triaged | | Reporter | Kinki Vacano (kinki.vacano) | | Created at | 2023-02-10T21:32:11Z | | Updated at | 2023-02-13T18:27:27Z | ``` { 'Build Id': 'unset', 'Business Unit': ['Platform'], 'Date of First Response': '2023-02-13T12:27:19.592-0600', "Is there anything you'd like to add?": 'default\r\n{\r\n state_entry()\r\n {\r\n llLinksetDataReset();\r\n\r\n llLinksetDataWrite("blah⧟A◈blah", "some data");\r\n llLinksetDataWrite("blah⧟➞◈blah", "some other data");\r\n\r\n string pattern = "⧟[➞A]◈";\r\n list findList = llLinksetDataFindKeys(pattern, 0, 0);\r\n \r\n llOwnerSay("Found: " + llDumpList2String(findList, "\\n"));\r\n }\r\n}', 'ReOpened Count': 0.0, 'Severity': 'Unset', 'System': 'SL Simulator', 'Target Viewer Version': 'viewer-development', 'What just happened?': 'llLinksetDataFindKeys() will not find all keys when a character set in a pattern contains certain characters. \r\n\r\nExample characters: ▢(U+25A2) and ➞(U+25BB)', 'What were you doing when it happened?': 'To reproduce:\r\n 1) Create an object\r\n 2) Add script below\r\n 3) Notice output returns only one key', 'What were you expecting to happen instead?': "Both keys should be return. If the ➞(U+25BB) character is replaced with the letter 'B' in the script, both keys will be returned. Also the character ➞(U+25BB) will work correctly in the pattern if it is not part of a character set.", } ```