You can encourage demand as much as you want, but if manufacturers are keen on selling the more profitable gas powered cars that demand will just go unfulfilled. By mandating that auto makers have to sell a quota of electric cars they have no choice but to fulfil the demand (and to create more demand if there isn't enough).