fix encoding issue for wctx