Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

wxWidgets 2.8 Unicode Support #34

Open
dustinrb opened this issue Aug 15, 2017 · 2 comments
Open

wxWidgets 2.8 Unicode Support #34

dustinrb opened this issue Aug 15, 2017 · 2 comments

Comments

@dustinrb
Copy link
Collaborator

ECCE compiles an ASCII only version of wxWidgets 2.8 while CentOS and Ubuntu/Debian ship with the unicode version of 2.8 which is incompatible. Because ECCE subclasses and extends much of wxWidgets (demarcated with the "ewx" prefix), updating the wx 2.8 code to be unicode compliant will be very time consuming.

We could

  1. Bite the bullet and fix the hundreds of unicode incompatibilities.
  2. Strip out as much ewx code as possible. The main reason cited for this code in the header files is "styling", though some of it does other things like field validation and selecting correct bitmap paths.
  3. Try compiling against wx 3.0 which is more forgiving for unicode use but may also be incompatible with ewx.

This will probably be a major project and I'm leaning towards a combination 2 and 3.

@ohlincha
Copy link
Collaborator

Can you give an example of 1? Basically, is it something that can be done automatically by writing a script?

@dustinrb
Copy link
Collaborator Author

The most trivial example are raw strings which must be wrapped in wxT() and I was able to fix this with regex find a replace. ECCE treats wxStrings and regular strings as equivalent which is not true in unicode mode. There is a lot of code like:

wxString ewxBitmap::pixmapFile(const wxString& name) 
{
  wxString ret = Ecce::ecceDataPath();
  ret.append("/client/pixmaps/");
  ret.append(name);
  return ret;
}

where wxStrings and normal strings are mixed together (Ecce::ecceDataPath() returns a string) and its a matter converting the right variable, but would probably be difficult to script. In some cases, wxStrings must be converted to char* which is fairly involved.

I know Julia will attempt a type conversion automatically if there is one defined. Do you know if there is similar functionality in C++?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants