简体   繁体   中英

when I show records from table , sometimes show in records this symbol. I want to understand that why its come sometimes.? i don't want it. �

this symbol ( ) show sometime during data shows from table. i have used PHP, MYSQL for my project.



why this symbol come? give me suggestion or hint about this.
thanks in advance..

usually means you've got a character set mismatch somewhere, and utf-8 data is being displayed in a non-utf context, eg iso-8859. ensure that EVERY stage of your pipeline is the same charset, or at least connected with appropriate translation logic:

browser -> server -> database -> data table -> database -> server -> browser.

any mismatches anywhere and you get mangled text.

specially this comes for special characters . so before inserting in DB encode the value. use htmlspecialchars() for encoding. and at the time of retreaving decode the text. use htmlspecialchars_decode() for decoding.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM