convert unicode to decimal

and also close window on save