开发者

Unicode characters for database

开发者 https://www.devze.com 2023-03-01 15:56 出处:网络
My database for Unicode is successfully working for storing and displaying values. But problem is with the Newline character, tab character and other character. That is it is skipping these character

My database for Unicode is successfully working for storing and displaying values. But problem is with the Newline character, tab character and other character. That is it is skipping these character to space. ex. word is

I am storing in this way.
दर
बदर

but its showing me output as
दर बदर

If I input
line 1
line 2
Outp开发者_开发百科ut is "line 1 line 2"

1: How this problem will be solved?

2: If I want to store html equivalent for Unicode in database and before displaying again converting to Unicode equivalent. What should I do?


  1. nl2br() is your friend
  2. This is a imaginary problem that doesn't exists, just use nl2br() when outputting to HTML.


have u used nl2br() ? i think this will solve the prob

prob 2-> $str = htmlentities($str, ENT_QUOTES, "UTF-8");

0

精彩评论

暂无评论...
验证码 换一张
取 消