11

I ran across the 30,000 character limit in this answer, and while working to pare my 42,000+ characters down, I found the "on-the-fly" character limit pop-up quite helpful.

However, that pop-up did not do the same count as the submission count.

After having dropped down to about 30,008 characters and making a few last changes, the pop-up went away and I thought I was good to go. I hit "submit" and then it told me I was at (roughly, I don't remember the exact number) 30,250 characters! 250+ characters more than the "on the fly" count.

So the "on-the-fly" count and the "submission" count are not the same.

EDIT with Nathaniel's analysis

Here's the on-the-fly count shown after adding about 300 characters (exceed by one character):

On-the fly counter

But here's what shows if one character is removed and an attempt to submit (exceed by 289 characters):

Post-submit counter

4

Using my favourite "boilerplate" text (Bleak House, starting at Chapter 1), my results are a little different: (1) the 30001 limit on entry; (2) a report of 30535 on submit. For comparison:

entry

But, after 'Post your answer':

submit

My text as entered is on 537 lines. I wonder if it's line breaks that account for (a) both the different outcomes in "analysis" between my numbers and Nathaniel's, and (b) the difference between "entry/on-the-fly" number (not counted) and "submitted" (counted)?

  • A MOST definite possibility! I went back to the version that Nathaniel copied from (since I edited since then), put it in MS Word and had it count the hidden ¶ marks and it came out too... 289, which seems far from coincidental that such was the number Nathaniel came up 'over' on submission. – ScottS Mar 21 '16 at 16:46
0

This is speculative, but it didn't fit in a comment so I'm posting it here.

It appears that your post contains some UTF-16 (Unicode) characters. Some databases count length (nvarchar in this case, according to the SEDE schema) in characters and others count it in bytes, so a UTF-16 character would consume two bytes. If the database used by SE is of this type (I don't know if it is) and if the front-end code checking as you type is just counting string length, this could account for the discrepancy -- the client-side validation says "yup, under 30k -- you're good to go" but when it actually gets to the server the database says "whoa, too much" and rejects it.

The as-you-type check can't ask the database as you type; that'd be too expensive. But either the code that does that checking should apply the same rules, meaning it has to check for multi-byte encodings, or the message you get as you type should provide some hint that 30k characters isn't precisely correct.

  • That struck me as a possiblity, too, but the test I ran used "plain ASCII". The line count seemed to correspond eerily to the differential >30K... – Dɑvïd Mar 21 '16 at 17:57
  • @Davïd huh, interesting. I didn't quite follow what you did in your answer; you're saying you used the same text, once on initial entry and then as an edit, and got different numbers? – Monica Cellio Mar 21 '16 at 18:00
  • I copied in 30,001 characters worth of Bleak House (resisting the temptation to actually read it), and deleted a character. The warning pop-up went away. I clicked "Post Your Answer", and got the second screenshot, that I was now at 30,535 characters. The difference between those two is (almost exactly) the number of lines in my "post". – Dɑvïd Mar 21 '16 at 18:05
  • Ah, thanks. (I started to read that, in college because it was assigned reading. What followed was my first-ever use of Cliff Notes.) – Monica Cellio Mar 21 '16 at 18:06
  • lol, as they say! :) I quite enjoy it -- although it's really it's the opening few pages that are most captivating. It's not exactly downhill from there, but it is outstanding (IMHO!). – Dɑvïd Mar 21 '16 at 18:10
  • I probably just didn't have enough experience with Big Literature at the time; as a 16-year-old whose biggest previous literary achievements were The Odyssey, Beowulf, and selected Shakespeare, I just wasn't prepared for Dickens. :-) – Monica Cellio Mar 21 '16 at 18:14

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .