I can’t comment on Java, but JS I know reasonably well and I can’t think of any place it uses CESU-8.