Should we HTML-encode special characters before storing them in the database?

后端 未结 6 1948
故里飘歌
故里飘歌 2020-12-03 13:36

I use MySQL to store data and my web pages are all encoded as UTF-8. I have a lot of Portuguese characters such as ç and õ and I\'m wondering if I

6条回答
  •  渐次进展
    2020-12-03 13:56

    If you are doing 100's or 1000's of page presentations for each write, then encoding on the way in is going to be more efficient. But in most circumstances I guess the difference would be negligible.

    But the other reasons (to not encode) are good, no doubt about it - and anyway it's pointless to encode characters which UTF-8 likes.

提交回复
热议问题