Wide Version (unicode) of CHR$() function

Started by MrBcx, April 10, 2025, 03:05:22 PM

Previous topic - Next topic

MrBcx

CHRW() ... Sneak peek ... coming to BCX 8.2.7

See attached screen shot.


MrBcx

Before I paint myself into a corner, here are my thoughts on the new CHRW() function and a few others
that I haven't mentioned yet.  It seems certain that BCX will continue its long history of generating
code that targets the WINAPI  (A) ANSI functions and not the (W) Unicode functions. 

That said, I feel certain there are times when just a little bit of built-in UNICODE enabling functions
would be a welcome improvement.  Identifying just what those enabling functions might include is what
I've been giving some recent thought, research, and experimentation to.

I am attaching two screenshots -- one is of my test code that shows the functions that I have working while
the other screenshot shows the output from that code.  You've already seen the GUI app that shows the hieroglyphs.

In a nutshell, these new functions are helpers for easily storing, copying, and printing strings, which should be
generally useful in console, GUI, and DLL projects. 

Two existing builtin BCX functions, AnsiToWide() and WideToAnsi() easily lend themselves to my new functions,
meaning it should not be necessary to reinvent a lot of wheels just to put a bit more UNICODE goodness into
our apps.

There are certainly other new BCX functions that I haven't considered yet that might make good additions as
builtin BCX functions but before I devote anymore time on this subject, I need to read your opinions on whether
this makes sense, and whether this stuff will actually be used by someone.

Quin

Kevin,
For my part at least I certainly would, I try to make my Windows apps target unicode when I can. BCX tends to target the Ascii functions of the windows API which is fine, but one of my apps is a text editor and I need all sorts of encodings for that.
In other words, I, for my part, would find this useful.
-Quin.
GitHub


MrBcx

Due to the underwhelming response, I've decided to not build any of this into BCX
and to instead share what I have in the form of an $INCLUDE file along with two demos.

Not extensively tested but the demos suggest they are working predictably. 


Quin

-Quin.
GitHub