Hi,
nein es ist nicht direkt eine Pseudo Verschlüsselung. Ich kenne zwar jetzt Java nicht aber normal steht Escape bzw. unescape dafür um z.B. ' in einer Benutzereingabe zu 'escapen'.
Denn in deinem Programm werden ja Strings à la:
Delphi-Quelltext
1:
| varname := 'Dies ist ein Teststring'; |
vorkommen.
Wenn du nun ein Textfeld hast und der Benutzer würde folgendes eingeben:
Hallo das ist ein Teststring'
würde dein Program mekkern, da der Benutzer ein Querytick benutzt hat. Dafür gibt es dann die Funktion escape dadurch wird aus einem ' in Benutzereingaben ein \'. (von PHP übernommen) Außerdem gehe ich davon aus, das escape auch noch andere Zeichen behandelt wie z.B. ä ö ü oder sonstige Sonderzeichen (non ASCII).
Wie genau die Funktion in Delphi heißt weis ich nicht... in meinem Delphi 2006 steht in der Hilfe (für Java folgendes)
| Zitat: |
The escape method returns a string value (in Unicode format) that contains the contents of charstring. All spaces, punctuation, accented characters, and any other non-ASCII characters are replaced with %xx encoding, where xx is equivalent to the hexadecimal number representing the character. For example, a space is returned as "%20."
Characters with a value greater than 255 are stored using the %uxxxx format.
Note The escape method should not be used to encode Uniform Resource Identifiers (URI). Use encodeURI and encodeURIComponent methods instead. |