Thinly slice the onion and fry gently in the butter or margarine until soft together with the cinnamon and star anise.
Meanwhile, thinly slice or shred the cabbage.
Add the vinegar, cider and sugar to the onion and mix thoroughly. When the sugar is melted, add the cabbage slices, toss well. Cook, covered, over a low heat for 30 minutes.
Peel and core the pears, then cut into chunks. Add these to the cabbage. Cook for a further 20-30 minutes until tender.
Season with salt and pepper to taste, add more sugar if not sweet enough. Before serving, remove cinnamon and star anise.