fix failure of wide printf/scanf functions to set wide orientation

in some cases, these functions internally call a byte-based input or
output function before calling getwc/putwc, so they cannot rely on the
latter to set the orientation.