...Since it's time to post RfDs, I want to throw in the updated proposal for the XCHARwordset. I hope I have included...give my input. I implemented the xchar proposal when it was first discussed...is to use utf8 as the xchar encoding. This has the benefit ... Letting key and emit handle xchars does not prevent me from ... put in the rfd that when the xcharwordset is loaded the Forth system uses ...
... it's time to post RfDs, I want to throw in...the updated proposal for the XCHARwordset. I hope I have...X-SIZE ( xc_addr u1 -- u2 ) XCHAR Computes the memory size of...specified encoding GET-ENCODING ( -- encoding ) XCHAR EXT Returns the current encoding...maxascii ; : get-encoding maxascii ; base ! -------------------------xchar.fs---------------------------- Experience: Build into Gforth...
... be enough. XC@+? would have four return values - bad style. Then maybe my xc@-step ( xcaddr1 u1 -- xcaddr2 u2 xc ) is an alternative it works well in a loop to process xchars until you reach the end of the buffer Yes, and error handling for wrong buffer ends could be done with other means (e.g. throwing an error or returning the garbage code). Wouldn't string/x be ...
... Words: XC-SIZE ( xc -- u ) XCHAR EXT Computes the memory size ... string without the last (garbled) XCHAR. I have not yet needed ... to display as the the XCHAR string starting at xc_addr, using ... and EMIT. SET-ENCODING ( encoding -- ) XCHAR EXT Sets the input encoding ... specified encoding GET-ENCODING ( -- encoding ) XCHAR EXT Returns the current encoding...
... is UTF-8, file names are still ANSI only (or rather ASCII only). This is a proof of the concept, that an internal UTF-8 encoding is not a major obstacle for a Windows Forth (with the XCHAR set implemented, for sure). Well, at least with MINOS as GUI - if you use Windows directly, you'll probably have to clutter your application with UTF16 and . -- Bernd Paysan "...
... is UTF-8, file names are still ANSI only (or rather ASCII only). This is a proof of the concept, that an internal UTF-8 encoding is not a major obstacle for a Windows Forth (with the XCHAR set implemented, for sure). Well, at least with MINOS as GUI - if you use Windows directly, you'll probably have to clutter your application with UTF16 and . -- Bernd Paysan "If you want it ...
...> discussion results as we go on, and removing SET-ENCODING and GET-ENCODING is part of it. XCHAR-ENCODING is now an environment query, which returns a string like "UTF-8". There must be ... encoding ... in the possible rare case, such as an 8-bit CHAR Forth with UTF-16 XCHARS, it could be specified explicitly that the internal encoding has the same endianess as the implementation itself, if...
...would be as an environment query. Yes, I thought about that, as well. I've modified the proposal with the discussion results as we go on, and removing SET-ENCODING and GET-ENCODING is part of it. XCHAR-ENCODING is now an environment query, which returns a string like "UTF-8". There must be some other standard where I can refer to for unambiguous names (e.g. MIME or HTTP RFCs). I'll suggest ...
... the string words use chars for their granularity, so the xchars words should use chars, too. Not that it makes a difference in practice. If XCHAR means eXtended CHAR, and an XCHAR in memory is always a multiple (sometimes variable multiple) number of CHARs, then a char ... memory would be sized in bytes=chars, and how many xchars you end up with would have to be determined on ...
...'t the granularity of the size specifications be the same (i.e., either aus or chars) throughout the wordset? Should be AUs. Hmm, thinking a little longer about it, all the string words use chars for their granularity, so the xchars words should use chars, too. Not that it makes a difference in practice. - anton -- M. Anton Ertl...