wxMac: wxTextCtrl convert quotes characters into their acute accent versions

Do you have a typical platform dependent issue you're battling with ? Ask it here. Make sure you mention your platform, compiler, and wxWidgets version.
Post Reply
remi
Knows some wx things
Knows some wx things
Posts: 26
Joined: Fri Nov 25, 2005 10:49 pm

wxMac: wxTextCtrl convert quotes characters into their acute accent versions

Post by remi »

Hi,

I'm using wxWidget 3.1.6 (built with defaults options) on MacOS Monterey, and doing this:

Code: Select all

wxTextCtrl ctrl;
ctrl << " ' ";
displays in the controler's view:

Code: Select all

and

Code: Select all

wxTextCtrl ctrl;
ctrl << " \" ";
displays in the controler's view:

Code: Select all

This behavior is present since previous versions of wxWidgets and it is not present on Linux and Windows.

Is there a way to prevent the controler to do that conversion?
User avatar
doublemax
Moderator
Moderator
Posts: 19114
Joined: Fri Apr 21, 2006 8:03 pm
Location: $FCE2

Re: wxMac: wxTextCtrl convert quotes characters into their acute accent versions

Post by doublemax »

What happens if you type these characters into the control, does it do the same?
If yes, does this also happen in other, non-wxWidgets applications?
Use the source, Luke!
PB
Part Of The Furniture
Part Of The Furniture
Posts: 4193
Joined: Sun Jan 03, 2010 5:45 pm

Re: wxMac: wxTextCtrl convert quotes characters into their acute accent versions

Post by PB »

I have never used macOS but I know wxTextCtrl there has functions for dealing with automatic replacements with "more typographically correct characters", see https://github.com/wxWidgets/wxWidgets/ ... trl.h#L147

They are undocumented, but even the main core developer suggests to use them: https://groups.google.com/g/wx-users/c/ ... 2IxfvDAQAJ

You could try calling OSXEnableAutomaticQuoteSubstitution(false) method and see if it helps.
remi
Knows some wx things
Knows some wx things
Posts: 26
Joined: Fri Nov 25, 2005 10:49 pm

Re: wxMac: wxTextCtrl convert quotes characters into their acute accent versions

Post by remi »

doublemax wrote: Fri May 20, 2022 8:22 am What happens if you type these characters into the control, does it do the same?
If yes, does this also happen in other, non-wxWidgets applications?
Yes, it does the same.
And no, it doesn't in other apps, at least the ones I tried.

And PB, thank you very much, your solution fixed the issue.
Post Reply