You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Analisys for bug #229 revealed that the proper solution for the bug, correctly handling multibyte character inside the string, isn't currently feasible without a lot of change I'm not willing to do inside the 22.x branch.
First of all there is quite the technical debt inside the Script tokens and expression evaluators. Not only the script token pass around the char pointer of the stringVar std::string, with unclear lifetimes, when it may be better to pass the stringVar directly, but also the passed pointer is a raw pointer, that may either leak or be invalid if the referring stringVar is destoryed.
This overrealince of raw pointers make making changes to the string, in particular changes that require to reconstruct the char pointers, to be highly problematic.
Rewriting the Script Token system to handle the object lifetime, using either unique or shared pointers (when refcounting is useful) should be the first pass to properly implement multibyte aware strings
The text was updated successfully, but these errors were encountered:
…r components to single byte char, provided that the system locale is setted according to the character set required. Stop gap measure for fixing bug #229, until a more proper solution can be implemented for #235
Analisys for bug #229 revealed that the proper solution for the bug, correctly handling multibyte character inside the string, isn't currently feasible without a lot of change I'm not willing to do inside the 22.x branch.
First of all there is quite the technical debt inside the Script tokens and expression evaluators. Not only the script token pass around the char pointer of the stringVar std::string, with unclear lifetimes, when it may be better to pass the stringVar directly, but also the passed pointer is a raw pointer, that may either leak or be invalid if the referring stringVar is destoryed.
This overrealince of raw pointers make making changes to the string, in particular changes that require to reconstruct the char pointers, to be highly problematic.
Rewriting the Script Token system to handle the object lifetime, using either unique or shared pointers (when refcounting is useful) should be the first pass to properly implement multibyte aware strings
The text was updated successfully, but these errors were encountered: