Measurement of charge asymmetry in hadronic Z decays