@RZaunere in the blog what you said really hits the mark. We want to implement Unicode and have solid code:
Clarion developers care about two things when it comes to string handling: correctness and stability . In Clarion 12 we explored making Unicode capability available through the existing STRING type with a strong emphasis on minimizing impact to existing code. Since then, we’ve continued testing and listening to practical, real-world feedback about how developers want to work with strings.
In Short, we need more than UString, we need a Fixed Length Wide String also… more below…
@RZaunere the current plan for Unicode support is to add only the USTRING that is a Wide CString and Null Terminated ?
The UString is exactly what’s needed to change CString to Wide and call the “W” Windows API ![]()
My “real-world feedback” is that the mass changing of the “Fixed Length” STRING type to the Null Terminated UString type will NOT result in “correctness and stability”. There are several pitfalls likely causing many small bugs.
I recall at the DevCon announcement there was a second Unicode type that was a “W” String … a UTF-16 version of the current ANSI STRING type. A Wide UTF-16 “fixed-length character string”.
Code with STRING changed to WString, that are both fixed length, will risk none of the pitfalls of Null Terminators. It’s a perfect change.
One thing fun about the new WSTRING is it could be pronounced “Schwing!” … that’s what Wayne & Garth would do ![]()
2nd change … the UString(length) declaration should be changed to match CString(length) and require the developer to +1 to leave room for the Null. E.g. a 30 character name requires CString(31) and UString(31).