CwCity Board >>> Allgemeines >>> CwCity in English >>> MySQL problem:Where is the space
MySQL problem:Where is the space

Seiten: 1
cfanderek
Verfasst am: 21.07.2013 um: 17:07 Uhr
 
Cw Posting Dude
Poster Teufel
Beiträge: 137
SPAM:
0% Spam
We all know that a string containing spaces like "hello world" will be transformed into "hello%20world" by this function,escape().

What puzzles me is the fact that the string,"hello%20world",will be transformed into "hello world" when it is stored in the MySQL database(UTF-8).

It seems that all the javascript and php script run conrrectly but I don't know why.

Strangely,"hello world" can be saved correctly in the database.It's still "hello world".

How to solve this problem?

----------------------------------------------
[php]
str_replace(" ","%20",$str);




Cfan==computer fan.
Cfan==C++ fan.
Cfan==chrome fan.

Welcome to my chat room : cfanderek.cwsurf.de/chatroom/


Letzte Änderung am: 22.07.2013 um:11:13 Uhr durch: cfanderek
 



consider
Verfasst am: 13.01.2014 um: 14:47 Uhr
 
Dr. CwCity.de
Community God
Beiträge: 7217
SPAM:
0% Spam
The whitespaces are ASCII encoded. ;)

%20 is only the HTML (URL Encoding) symbol for the whitespace. The true whitspaces ASCII symbols are not shown, because they are interpretet and shown as whitespasce. ;)

The ASCII symbol for the whitespace is 032
Unicode is U+0020

www.theasciicode.com.ar/extended-as...



Letzte Änderung am: 13.01.2014 um: 15:07 Uhr durch: consider
 

cfanderek
Verfasst am: 14.01.2014 um: 05:35 Uhr
 
Cw Posting Dude
Poster Teufel
Beiträge: 137
SPAM:
0% Spam
  
Zitat von consider
The whitespaces are ASCII encoded. ;)

%20 is only the HTML (URL Encoding) symbol for the whitespace. The true whitspaces ASCII symbols are not shown, because they are interpretet and shown as whitespasce. ;)

The ASCII symbol for the whitespace is 032
Unicode is U+0020

www.theasciicode.com.ar/extended-as...

Though I have solved this problem,thank you all the same.


Cfan==computer fan.
Cfan==C++ fan.
Cfan==chrome fan.

Welcome to my chat room : cfanderek.cwsurf.de/chatroom/
 

 
Seiten: 1

Folgende User sind hier gerade aktiv:
-

ANZEIGE