How to determine if a String contains invalid encoded characters

前端 未结 10 1338
眼角桃花
眼角桃花 2020-12-02 11:38

Usage scenario

We have implemented a webservice that our web frontend developers use (via a php api) internally to display product data. On the webs

10条回答
  •  夕颜
    夕颜 (楼主)
    2020-12-02 12:11

    Replace all control chars into empty string

    value = value.replaceAll("\\p{Cntrl}", "");
    

提交回复
热议问题