Polanski 'to appeal' court ruling