Bug overview description.
Using e621 site in Firefox (84.0.2) on Windows 10 (20H2 19042.685 with no extra keyboard inputs or languages enabled); pasted a string from Notepad++ into e6 pool description, text area js counter indicated 9980 characters, submitted change and received a server validation message it exceeded 10000 limit. (NP++ indicated length 10076 due to a few multibyte …“”’ & \r\n instead of \n, I didn't use any DText/BCode markup). Played around a bit to figure out why, determined that js counter counts per character (line breaks and non_ascii/multibyte characters each count as 1) which makes sense. Figured maybe the server validation was counting bytes instead so replaced anything outside common 7-bit ascii (-F) with equivalents in range and switched from CrLf(\r\n) to Lf(\n) line breaks and then js count matched NP++ indicated lengths. Submitted again and received notice that it exceeded 10k again, shortened it by removing 10 of the chars I added and a few line breaks and the server accepted it. (pool was: 25763)
What part(s) of the site page(s) are affected?
Pool editing (and probably pool creation page and a few other site pages too) description field.
What is the expected behavior?
Server validation and js character count use same criteria for count and allow for 10k (ascii) characters (or adjusted to compensate for multibyte characters if needed due to db field size limit).
What actual behavior is given instead?
JS character count shows actual individual character count, server validation rejects string as too long when close to limit
Time of incident (if applicable).
2021/12/29 ~1700 EST
Can you reproduce the bug every time?
Yes
What steps did you take to replicate this bug?
Copied txt from FA post pages to Notepad++, added some labels and copy/pasted into e621
Errors or other messages returned (if any).
"Error: Description is too long (maximum is 10000 characters)"