Usually only happened when a French person copied and pasted their text directly from a Word document… dang weird spaces and accented characters… drove my boss mad when I told him it was because it French, and not a glitch.
Still had to work around it… text counters in textboxes had to account for accented characters, which took two bytes instead of one.
“I only have 2000 letters!” … 2000 including 200 accent characters made it 2200 characters, not 2000.
“I only have 2000 letters!” … 2000 including 200 accent characters made it 2200 characters, not 2000.
Or, you could count it in Unicode characters, and not in whatever bizarro charset you’re using over there. Then “À” is one character, just as it’s supposed to be.
The problem typically comes from improper conversion between charsets. Like Windows-1252 to Unicode, or something equally horrible.
Easy. Just use utf-32 and make the text field a maximum of 500 letters. That will be a maximum of 2000 bytes, doesn’t matter if the user is french or Chinese.
Usually only happened when a French person copied and pasted their text directly from a Word document… dang weird spaces and accented characters… drove my boss mad when I told him it was because it French, and not a glitch.
Still had to work around it… text counters in textboxes had to account for accented characters, which took two bytes instead of one.
“I only have 2000 letters!” … 2000 including 200 accent characters made it 2200 characters, not 2000.
Or, you could count it in Unicode characters, and not in whatever bizarro charset you’re using over there. Then “À” is one character, just as it’s supposed to be.
The problem typically comes from improper conversion between charsets. Like Windows-1252 to Unicode, or something equally horrible.
I was basically calculating in Javavscript then in PHP for validation before I sent it to Zoho.
The DB also was fine. It was honestly just PHP and Javascript. It’s all good now though!
Not if the maximum is due to the database being configured to have a maximum space of 2000 bytes for that field.
Ah, well, bytes ≠ characters, but yes, that can certainly be an issue.
Easy. Just use utf-32 and make the text field a maximum of 500 letters. That will be a maximum of 2000 bytes, doesn’t matter if the user is french or Chinese.
XD ahahah.