Why does TOpenDialog display a duplicate file filter mask if it contains a question mark?
<p>Given the following test form (tested in Delphi 10.1 and Delphi 2007):</p>

<pre><code>object Form1: TForm1
  Caption = 'Form1'
  ClientHeight = 340
  ClientWidth = 639
  object b_Test: TButton
    Caption = 'Test'
    OnClick = b_TestClick
  end
  object od_test: TOpenDialog
    Filter = 'blub (blub*.dbf)|blub*.dbf|bla (bla?.dbf)|bla?.dbf'
  end
end
</code></pre>

<p>(I left out some default properties, basically it's a form with a TOpenDialog and a button. The only important part is the TOpenDialog.Filter property.)</p>

<pre><code>unit Unit1;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, StdCtrls;

type
  TForm1 = class(TForm)
    od_test: TOpenDialog;
    b_Test: TButton;
    procedure b_TestClick(Sender: TObject);
  end;

var
  Form1: TForm1;

implementation

{$R *.dfm}

procedure TForm1.b_TestClick(Sender: TObject);
begin
   od_test.Execute;
end;

end.
</code></pre>

<p>Why does the dialog show the filter containing a question mark twice like this:</p>

<p><a href="https://i.stack.imgur.com/Suw74.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/Suw74.png" alt="duplicate filter"></a></p>

<p>Is this a known bug or am I doing anything wrong? If it's a known bug, is there a workaround (apart from the obvious one of leaving out the ' (bla?.dbf)' part of the description which would mean I had to change all descriptions.)?</p>

<p>EDIT: This is on Windows 8.1. I haven't tried other versions yet. And in case it makes a difference: I have disabled the explorer option "Hide extensions for knonw file types".</p>