set enc to wxUnusedVar in unicode mode, remove the old ugly code