0

Is there a built-in method to use wide (16-bit) character strings in Exprtk? I have modified the source code exprtk.hpp to accomplish this and it seems to work correctly. It is not my preferred way to go about it though as I'm not sure that I covered all the necessary changes and it is a fair amount of work. So an update of exprtk.hpp requires a repeat of the work. Ideally there would be something like a #define UseWchar to accomplish this.

  • Submit a pull request to the project to add the feature? – Alan Birtles Jun 26 '23 at 12:09
  • 1
    why would you want to use `wchar_t`? On modern Windows it's better to use the [UTF-8 locale](https://stackoverflow.com/a/63454192/995714) rather than UTF-16. That'll make the code much more portable – phuclv Jun 26 '23 at 12:11
  • 1
    As an alternative, have you considered using UTF-8 at least where input to the library is concerned? That does not require any code changes on exprtk and is equally expressive as (though less wasteful than) Windows' UTF-16 encoding – Botje Jun 26 '23 at 12:12
  • Using UTF8 is definitely the way to go. Thanks for the suggestions. – DuxburyDutch Jul 04 '23 at 12:09

0 Answers0