Character count in IE and firefox | Search |
NowSMS Support Forums ⬆ NowSMS Support - SMS Issues ⬆ Archive through August 10, 2011 ⬆ |
◄ ► |
Author | Message | ||||
Omar Frequent Contributor Username: Kfsmart Post Number: 54 Registered: 01-2008 |
Hi, I have one issue,that "Enter" character considered as 2 characters in IE and one in chrome and firefox. in unicode-smsout log looks like: if sent from: IE:000D000A firefox and chrome:000A Kindly advise | ||||
Des - NowSMS Support Board Administrator Username: Desosms Post Number: 3301 Registered: 08-2008 |
Hi Omar, That is an interesting observation. However, I have no advice. NowSMS accepts whatever data is submitted via the web form. IE uses a carriage return line feed combination (two characters) for a new line when you press Enter. The other browsers use only a single line feed character. In both cases, NowSMS is functioning properly, counting and encoding the characters correctly as presented by the web browser. If it bothers you, you are free to add your own Javascript to the web form to automatically remove the carriage return (0x0D) character. (The web form can be found in NowSMS\HTML\Send Text Message.htm) -- Des NowSMS Support | ||||
Omar Frequent Contributor Username: Kfsmart Post Number: 55 Registered: 01-2008 |
Hi Des, Thanks,but not only the issue in 0xD. Suppose I'm sending a unicode SMS in chrome with 69 charachers and it contains 1 line feed,now the total is 70(still 1 sms) But Nowsms is considering it as 2 SMS,on Submit ,but one SMS when sending to the operator. | ||||
Des - NowSMS Support Board Administrator Username: Desosms Post Number: 3305 Registered: 08-2008 |
Hi Omar, That is not what you explained in your first message. You said:
I interpret that as meaning that two characters are sent for IE, and only one character for the other browser. However, I see in testing it, that this is incorrect. 1 character is counted in the other browsers, yet 2 are sent. This appears to be a browser bug, as it is not clear to me why the browser would only report the line feed (0x0A) character when queried via JavaScript, yet send both carriage return (0x0D) and line feed (0x0A) when posting the form. It is easy enough to work-around this problem in the JavaScript that counts the characters. You can edit NowSMS\HTML\Send Text Message.htm and replace the updateTextBoxCounter() function with the attached update.
-- Des NowSMS Support | ||||
Omar Frequent Contributor Username: Kfsmart Post Number: 56 Registered: 01-2008 |
Dear Des, Quote: "However, I see in testing it, that this is incorrect. 1 character is counted in the other browsers, yet 2 are sent." No,it is considered as two on IE and one on other browsers: Kindly check this is from Nowsms-SMSout log. IE:SMSCMsgId=720291093802;Binary=1;DCS=8;Data=0645000D000A0646 Firefox:SMSCMsgId=722151093803;Binary=1;DCS=8;Data=0645000A0646 I attached also SMSdebug. | ||||
Omar Frequent Contributor Username: Kfsmart Post Number: 57 Registered: 01-2008 |
| ||||
Des - NowSMS Support Board Administrator Username: Desosms Post Number: 3312 Registered: 08-2008 |
Then I don't understand your issue. NowSMS sends whatever characters are submitted to it. I do understand that if the character count does not match the number of characters sent, that is a problem. The JavaScript update that I posted previously addresses this (but may now count MORE characters if your browser submits only %0A for a line break). |