bettyb1656
asked on
How do control characters get entered in textbox
I support an online credit card payment system. Every once in a while the data the customer enters into a textbox (different ones) has control characters at the end of the text data. Specifically newline carriage return (Hex 0D0A or Hex 0D0A0D0A). I have not been able to input these characters using IE 6.0 on XP Pro or using IE 6.0 on Win 2000 server. Since I can't input them I can't test to see if I have successfully stripped them before using the data.
Does anyone know how the customer is entering these control characters? Thanks.
BettyB.
Does anyone know how the customer is entering these control characters? Thanks.
BettyB.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
>>Does anyone know how the customer is entering these control characters?<<
Sure:
Hex 0D0A = Alt+13 Alt+10. As in ♪◙
Hex 0D0A0D0A = Alt+13 Alt+10 Alt+13 Alt+10, as in ♪◙♪ψ 9;
Sure:
Hex 0D0A = Alt+13 Alt+10. As in ♪◙
Hex 0D0A0D0A = Alt+13 Alt+10 Alt+13 Alt+10, as in ♪◙♪ψ
ASKER
I couldn't get anything from notepad, word, or excel to enter the control characters that are giving me trouble.
Alt+13 Alt+10 show on the input screen and in the database and do not cause the same problems.
Also, my users are quite unsophisticated and I doubt they ever use the alt key. One user entered his address with hex 0D0A at the end three times in a row. I believe that the problem is using a MAC or a Unix variant, but I don't know and don't have either to test with.
Another problem that I have run into is that production is SQL Server 7 which shows the hex characters as a square box but my test systems are SQL Server 2000 and the hex characters show as spaces. Is there any configuration to set to have the SQL Server 2000 show the square boxes?
Alt+13 Alt+10 show on the input screen and in the database and do not cause the same problems.
Also, my users are quite unsophisticated and I doubt they ever use the alt key. One user entered his address with hex 0D0A at the end three times in a row. I believe that the problem is using a MAC or a Unix variant, but I don't know and don't have either to test with.
Another problem that I have run into is that production is SQL Server 7 which shows the hex characters as a square box but my test systems are SQL Server 2000 and the hex characters show as spaces. Is there any configuration to set to have the SQL Server 2000 show the square boxes?
not sure on display, but is it possible that the control character could be added to the value elsewhere in your script?
ASKER
I don't think it is possible. The system has been running since 2001 and there have only been 6 times that newline carriage return characters have appeared in the database.
Fritz the Blank