improve printwcs, add a test

See #2445, #2447