Re: wxEuphoria v0.15.0

new topic     » goto parent     » topic index » view thread      » older message » newer message
Vinoba said...
mattlewis said...

Getting 2.9 up and running will take a bit more work. I think they made some changes to the way wxStrings work,

wxWidgets site says pf 2.9 “(small) changes in behaviour since 2.8” I do not buy that argument. It is also completely Unicode so even your English language Ascii page would have to be brought up to 2 bytes level like Microsoft’s internals. We can have debate whether or not to go UTF-8 route (your preference for Linus would tend to drag you that way), but as of now, there is no problem with memory availability, and since Euphoria is already at 4 bytes per character level, one might stick to a 32 bit (or rather 21 bit) level . Welcome, Chinese audience!
C, C++ and assembler routines to convert are already available and debugged, and would, in any case, be easy to develop in Eu.

Actually, I remembered incorrectly. It's 3.0 that has big changes to strings in wxWidgets. wxEuphoria already has code that converts sequences to wxString (for both ANSI and Unicode wxWidgets builds). In the C++ wxEuphoria code, converting a sequence to a string looks like this (showing the full wrapper from wxEuphoria.cpp):

object WXEUAPI  message_box(object s1, object s2, intptr_t ok) 
{ 
	intptr_t ret = wxMessageBox( get_string(s1), get_string(s2), ok ); 
 
	wxDeRefDS( s1 ); 
	wxDeRefDS( s2 ); 
	return ret; 
} 

You can see the two calls to get_string(). That's a function that I wrote that does the conversion from a sequence to what wxWidgets wants. They use a UTF-16 sort of encoding. There are also wrapped functions for converting to/from UTF-8 (part of wxWidgets). So the user can use either way, right out of the box (assuming he uses a Unicode build of wxWidgets, of course).

Vinoba said...

I have toyed with the idea of doing it but my mental block against C++ stops me from going ahead.

The C++ coding to simply add new wrappers to wxEuphoria is pretty trivial at this point.

Matt

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu