Charge ordering in high-temperature superconductors