List Info

Thread: History search - problems with multiline messages




History search - problems with multiline messages
user name
2007-02-28 07:20:31
Hello Devs,

Recently I had to search my message history and noticed strange behavior with multiline messages. I then tried to reproduce it and came up with the following case:

I initiate a chat with someone and type the following on two lines, just as it shows here (by using <Ctrl&gt; + <Enter&gt; to insert a newline):
-------------
test1
test2
-------------
and send it.

Then I type a single line:
-------------
test3
-------------
and send it.

After that, I open the history and want to search for the string "test1", but it gives me no result. The same for "test2". Now I try "test3" and voila - the string is found. Then I try the sub-string "test" and I get all 3 of them. All these without the quotes, of course.

Here is the part of the log file that keeps the history:

-----------------------------------------
<?xml version="1.0" encoding="UTF-8" ?>
<history>
...
...
...
  <record timestamp="1172667441884">
 &nbsp;  <dir>;out</dir>
 &nbsp;  <msg>;<![CDATA[test1
test2]]>&lt;/msg>
 &nbsp;  <msgTyp>text/plain</msgTyp>
 &nbsp;  <enc>;UTF-8</enc>
 &nbsp;  <uid>;11726674418832754428&lt;/uid>
 &nbsp;  <receivedTimestamp>1172667441884</receivedTimestamp>
  </record>
  <record timestamp="1172667443547">
 &nbsp;  <dir>;out</dir>
 &nbsp;  <msg>;<![CDATA[test3]]&gt;</msg&gt;
 &nbsp;  <msgTyp>text/plain</msgTyp>
 &nbsp;  <enc>;UTF-8</enc>
 &nbsp;  <uid>;117266744354733004951</uid>;
 &nbsp;  <receivedTimestamp>1172667443547</receivedTimestamp>
  </record>
</history>
-----------------------------------------

Note that it reproduces both for ICQ and YM, probably because the format of the history file is the same.

Thanks,
--Pavel Tankov



Now that's room service! Choose from over 150,000 hotels
in 45,000 destinations on Yahoo! Travel
to find your fit.
Re: History search - problems with multiline messages
user name
2007-02-28 08:24:11
Hi,

I've located the problem - its some regular expression
issue. Will be 
fixed.
Thanks.

damencho

Pavel Tankov wrote:
> Hello Devs,
>
> Recently I had to search my message history and noticed
strange 
> behavior with multiline messages. I then tried to
reproduce it and 
> came up with the following case:
>
> I initiate a chat with someone and type the following
on two lines, 
> just as it shows here (by using <Ctrl> +
<Enter> to insert a newline):
> -------------
> test1
> test2
> -------------
> and send it.
>
> Then I type a single line:
> -------------
> test3
> -------------
> and send it.
>
> After that, I open the history and want to search for
the string 
> "test1", but it gives me no result. The same
for "test2". Now I try 
> "test3" and voila - the string is found. Then
I try the sub-string 
> "test" and I get all 3 of them. All these
without the quotes, of course.
>
> Here is the part of the log file that keeps the
history:
>
> -----------------------------------------
> <?xml version="1.0"
encoding="UTF-8" ?>
> <history>
> ...
> ...
> ...
>   <record timestamp="1172667441884">
>     <dir>out</dir>
>     <msg><![CDATA[test1
> test2]]></msg>
>     <msgTyp>text/plain</msgTyp>
>     <enc>UTF-8</enc>
>     <uid>11726674418832754428</uid>
>    
<receivedTimestamp>1172667441884</receivedTimestamp
>
>   </record>
>   <record timestamp="1172667443547">
>     <dir>out</dir>
>     <msg><![CDATA[test3]]></msg>
>     <msgTyp>text/plain</msgTyp>
>     <enc>UTF-8</enc>
>     <uid>117266744354733004951</uid>
>    
<receivedTimestamp>1172667443547</receivedTimestamp
>
>   </record>
> </history>
> -----------------------------------------
>
> Note that it reproduces both for ICQ and YM, probably
because the 
> format of the history file is the same.
>
> Thanks,
> --Pavel Tankov
>
>
------------------------------------------------------------
------------
> Now that's room service! Choose from over 150,000
hotels
> in 45,000 destinations on Yahoo! Travel 
> <http://travel.yahoo.com/hotelse
archpage;_ylc=X3oDMTFtaTIzNXVjBF9TAzk3NDA3NTg5BF9zAzI3MTk0OD
EEcG9zAzIEc2VjA21haWx0YWdsaW5lBHNsawNxMS0wNw--> 
> to find your fit.

------------------------------------------------------------
---------
To unsubscribe, e-mail: dev-unsubscribesip-communicator.dev.java.net
For additional commands, e-mail: dev-helpsip-communicator.dev.java.net


[1-2]

about | contact  Other archives ( Real Estate discussion Medical topics )