As per discussion in ML and IRC, when TQString is a temporary object, calling ascii(), latin1(), utf8() and local8bit() can result in dandling pointers.
We should look at a solution that prevents this, for example by using shared pointers instead of const char* for the return type.
This will require API changes and probably quite a bit of work to update all the usage across TDE.
We should also consider whether to make latin1() an internal function and whether we should use utf8 format instead of unicode as base for storage.
As per discussion in ML and IRC, when TQString is a temporary object, calling ascii(), latin1(), utf8() and local8bit() can result in dandling pointers.
We should look at a solution that prevents this, for example by using shared pointers instead of const char* for the return type.
This will require API changes and probably quite a bit of work to update all the usage across TDE.
We should also consider whether to make latin1() an internal function and whether we should use utf8 format instead of unicode as base for storage.
MicheleC
added this to the R14.2.0 release milestone 5 years ago
MicheleC
modified the milestone from R14.2.0 release to R14.2.x1 year ago
As per discussion in ML and IRC, when TQString is a temporary object, calling ascii(), latin1(), utf8() and local8bit() can result in dandling pointers.
We should look at a solution that prevents this, for example by using shared pointers instead of const char* for the return type.
This will require API changes and probably quite a bit of work to update all the usage across TDE.
We should also consider whether to make latin1() an internal function and whether we should use utf8 format instead of unicode as base for storage.