I'm very confused with the way Chrome->PHP->SQL Server handles a bullet symbol. It appears that a bullet symbol is intrepreted differently among the three and SQL Server fails to INSERT my string containing a bullet symbol.
Say I have a form that has an input textbox field with maxlength='50' and I'm using chrome to fill it out. I fill out the textbox with a string that's up to 49 characters, plus a bullet symbol. Chrome interprets that as 50 characters and allows me to move on; however, when I submit through PHP to execute my INSERT query with a $_POST['string'] explicitly (without any sanitization/truncation/conversion), SQL Server fails.
SQLSTATE[22001]: [Microsoft][ODBC Driver 11 for SQL Server][SQL Server]String or binary data would be truncated.
I believe it's due to SQL Server interpreting the bullet as more than one character, as opposed to how Chrome interpreted it. What is good practice or a standard rule of thumb to get around this?
Note: I'm running PHP 5.4.24 and SQL Server 2008 R2.