The unicode string in question:
ਪਹਿਲਾਂ ਲੋਕਾਂ ਦੇ ਦਿਲਾਂ ਦਿਮਾਗ਼ਾਂ ਚੋਂ ਇਹ ਵਹਿਮ ਕੱਢੋ ਕਿ
ਅਸੀਂ ਹਿੰਦੂ ਹਾਂ,
ਅਸੀਂ ਸਿੱਖ ਹਾਂ,
ਅਸੀਂ ਮੁਸਲਮਾਨ ਹਾਂ,
ਅਸਲੀਅਤ ਇਹ ਹੈ ਕਿ
ਅਸੀਂ ਭੁੱਖੇ ਹਾਂ,
ਅਸੀਂ ਬੇਰੁਜ਼ਗਾਰ ਹਾਂ,
ਅਸੀਂ ਨਸ਼ੇੜੀ ਹਾਂ,
ਅਸੀਂ ਲਾਚਾਰ ਹਾਂ,
ਅਸੀਂ ਬੇਵਕੂਫ਼ ਹਾਂ,
ਅਸੀਂ ਬੀਮਾਰ ਹਾਂ,
Language: Punjabi
Format: Unicode
Problem:
Javascript reports its str.length() =
226; whereas WhatsApp says 700 Characters
.
Javascript Code:
console.log(inputStr.length);
Whatsapp Screenshot 01:
Fine, no error: (count at 698 or 699)
Just adding a new line from mobile keyboard makes it over 700
This seems to be a bug with Whatsapp. If you try inputting text with newlines, you will find that on the 15th line it will give the error of exceeding 700 characters, no matter what the current character count is.
If you try to put your string without the newline character it will work and not show the 700 character exceeded message (as shown in the image attached below)
The correct length is the javascript string length which is 226.