add end location and fix chinese encoding problems