lionfish Absent Member.
Absent Member.
1638 views

Can not find the task with a subject containing Unicode

As described in the subject, even though I can see it in the client, no tasks can be found through web service. Following is the request and response.

[Request]
[HTML]<?xml version="1.0" encoding="utf-8"?>
<getItemsRequest xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<view xmlns="http://schemas.novell.com/2005/01/GroupWise/methods">default recipientStatus message peek</view>
<filter xmlns="http://schemas.novell.com/2005/01/GroupWise/methods">
<element xsi:type="FilterGroup" xmlns="http://schemas.novell.com/2005/01/GroupWise/types">
<op>and</op>
<element xsi:type="FilterEntry">
<op>eq</op>
<field>subject</field>
<value>Ф</value>
</element>
<element xsi:type="FilterEntry">
<op>isOf</op>
<field>@type</field>
<value>Task task</value>
</element>
</element>
</filter>
<count xmlns="http://schemas.novell.com/2005/01/GroupWise/methods">-1</count>
</getItemsRequest>[/HTML]

[Response]
[HTML]<?xml version="1.0" encoding="utf-8"?>
<getItemsResponse xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<items xmlns="http://schemas.novell.com/2005/01/GroupWise/methods" />
<status xmlns="http://schemas.novell.com/2005/01/GroupWise/methods">
<code xmlns="http://schemas.novell.com/2005/01/GroupWise/types">0</code>
</status>
</getItemsResponse>[/HTML]
Labels (1)
0 Likes
9 Replies
Anonymous_User Absent Member.
Absent Member.

Re: Can not find the task with a subject containing Unicode

A couple of comments. I don't know how to handle Ф
I would assume that would try to convert to a Unicode character.
In my case I would take that as the subject string.
The XML needs to be in UTF8. Also, your are doing eq on the subject?
Are you saying the subject was one character? If not, you would have
to use contains or begins.

I've attached a simple test and an edited SOAP trace.

private void testFindKorea()
{
WebReference.getItemsRequest req = new vcsClient.WebReference.getItemsRequest();
WebReference.getItemsResponse resp;
WebReference.Filter filter = new vcsClient.WebReference.Filter();
WebReference.FilterEntry fe = new vcsClient.WebReference.FilterEntry();
fe.op = vcsClient.WebReference.FilterOp.eq;
fe.field = "subject";
fe.value = "특정 페이지를";
filter.element = fe;
req.filter = filter;
req.container = "folders";
resp = ws.getItemsRequest(req);
if (0 == resp.status.code)
{
MessageBox.Show(resp.items[0].id);
}
}

<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope>
<soap:Body>
<getItemsRequest>
<container>folders</container>
<filter>
<element>
<op>eq</op>
<field>subject</field>
<value>íŠ¹ì • 페이지를</value>
</element>
</filter>
<count>-1</count>
</getItemsRequest>
</soap:Body>
</soap:Envelope>

Preston


>>> On Wednesday, April 08, 2009 at 2:06 PM, lionfish<lionfish@no-mx.forums.novell.com> wrote:



As described in the subject, even though I can see it in the client, no
tasks can be found through web service. Following is the request and
response.

[REQUEST]
<?xml version="1.0" encoding="utf-8"?>
<getItemsRequest xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<view
xmlns="http://schemas.novell.com/2005/01/GroupWise/methods">default
recipientStatus message peek</view>
<filter xmlns="http://schemas.novell.com/2005/01/GroupWise/methods">
<element xsi:type="FilterGroup"
xmlns="http://schemas.novell.com/2005/01/GroupWise/types">
<op>and</op>
<element xsi:type="FilterEntry">
<op>eq</op>
<field>subject</field>
<value>Ф</value>
</element>
<element xsi:type="FilterEntry">
<op>isOf</op>
<field>@type</field>
<value>Task task</value>
</element>
</element>
</filter>
<count
xmlns="http://schemas.novell.com/2005/01/GroupWise/methods">-1</count>
</getItemsRequest>

[RESPONSE]
<?xml version="1.0" encoding="utf-8"?>
<getItemsResponse xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<items xmlns="http://schemas.novell.com/2005/01/GroupWise/methods"
/>
<status xmlns="http://schemas.novell.com/2005/01/GroupWise/methods">
<code
xmlns="http://schemas.novell.com/2005/01/GroupWise/types">0</code>
</status>
</getItemsResponse>


--
lionfish
------------------------------------------------------------------------
lionfish's Profile: http://forums.novell.com/member.php?userid=48614
View this thread: http://forums.novell.com/showthread.php?t=368802
0 Likes
lionfish Absent Member.
Absent Member.

Re: Can not find the task with a subject containing Unicode

Hi, Preston

The subject string is in Unicode (UTF-8 encoded), and the operation is eq.

When I test using a subject with only ASCII codes, it works. If I change it to Non-ASCII codes, the tasks can not be found.

I guess the problem is in the filter in GW. When doing matching, it doesnot handle Unicode well.


Preston Stephenson;1772857 wrote:
A couple of comments. I don't know how to handle Ф
I would assume that would try to convert to a Unicode character.
In my case I would take that as the subject string.
The XML needs to be in UTF8. Also, your are doing eq on the subject?
Are you saying the subject was one character? If not, you would have
to use contains or begins.
......

Preston

0 Likes
Anonymous_User Absent Member.
Absent Member.

Re: Can not find the task with a subject containing Unicode

I don't understand your comment. "Ф" is
not UTF-8. The Unicode character 0x1060 would
be three UTF-8 characters 0xE1 0x81 0xA0.

I showed you and example of searching on
Unicode strings. You just have to pass UTF-8
characters in the request. We only support
UTF-8 in the XML requests.

Preston

>>> On Thursday, April 09, 2009 at 7:56 AM,

lionfish<lionfish@no-mx.forums.novell.com> wrote:

> Hi, Preston
>
> The subject string is in Unicode (UTF-8 encoded), and the operation is
> eq.
>
> When I test using a subject with only ASCII codes, it works. If I
> change it to Non-ASCII codes, the tasks can not be found.
>
> I guess the problem is in the filter in GW. When doing matching, it
> doesnot handle Unicode well.
>
>
> Preston Stephenson;1772857 Wrote:
>> A couple of comments. I don't know how to handle Ф
>> I would assume that would try to convert to a Unicode character.
>> In my case I would take that as the subject string.
>> The XML needs to be in UTF8. Also, your are doing eq on the subject?
>> Are you saying the subject was one character? If not, you would have
>> to use contains or begins.
>> ......
>>
>> Preston
>>
>>

0 Likes
lionfish Absent Member.
Absent Member.

Re: Can not find the task with a subject containing Unicode

I am using Java, C# and .Net, not C++.
I don't think I need to specify UTF-8 when I create a string.
And in request message, encoding="utf-8".

Is the following string in Unicode? If it is, the task with the subject can not be found.

subject = new String("A" + "\u00ea" + "\u00f1" + "\u00fc" + "C");


Preston Stephenson;1773313 wrote:
I don't understand your comment. "Ф" is
not UTF-8. The Unicode character 0x1060 would
be three UTF-8 characters 0xE1 0x81 0xA0.

I showed you and example of searching on
Unicode strings. You just have to pass UTF-8
characters in the request. We only support
UTF-8 in the XML requests.

Preston

>>> On Thursday, April 09, 2009 at 7:56 AM,

lionfish<lionfish@no-mx.forums.novell.com> wrote:

> Hi, Preston
>
> The subject string is in Unicode (UTF-8 encoded), and the operation is
> eq.
>
> When I test using a subject with only ASCII codes, it works. If I
> change it to Non-ASCII codes, the tasks can not be found.
>
> I guess the problem is in the filter in GW. When doing matching, it
> doesnot handle Unicode well.
>
>
> Preston Stephenson;1772857 Wrote:
>> A couple of comments. I don't know how to handle Ф
>> I would assume that would try to convert to a Unicode character.
>> In my case I would take that as the subject string.
>> The XML needs to be in UTF8. Also, your are doing eq on the subject?
>> Are you saying the subject was one character? If not, you would have
>> to use contains or begins.
>> ......
>>
>> Preston
>>
>>
0 Likes
Anonymous_User Absent Member.
Absent Member.

Re: Can not find the task with a subject containing Unicode

It all depends on what gets put in the SOAP request.
I haven't figured out how to get Unicode (Asian)
chars into the test app in Java. I'm using an old
NetBeans IDE for my Java app. (That may be my problem.)

The sample program and SOAP trace I posted before
came from a .NET sample problem. In the .NET sample,
I put in Unicode characters and .NET is converting
them to UTF-8 in the SOAP request.

Preston

>>> On Thursday, April 09, 2009 at 9:06 AM,

lionfish<lionfish@no-mx.forums.novell.com> wrote:

> I am using Java, C# and .Net, not C++.
> I don't think I need to specify UTF-8 when I create a string.
> And in request message, encoding="utf-8".
>
> Is the following string in Unicode? If it is, the task with the subject
> can not be found.
>
>
> Code:
> --------------------
> subject = new String("A" + "\u00ea" + "\u00f1" + "\u00fc" + "C");
> --------------------
>
>
> Preston Stephenson;1773313 Wrote:
>> I don't understand your comment. "Ф" is
>> not UTF-8. The Unicode character 0x1060 would
>> be three UTF-8 characters 0xE1 0x81 0xA0.
>>
>> I showed you and example of searching on
>> Unicode strings. You just have to pass UTF-8
>> characters in the request. We only support
>> UTF-8 in the XML requests.
>>
>> Preston
>>
>> >>> On Thursday, April 09, 2009 at 7:56 AM,

>> lionfish<lionfish@no-mx.forums.novell.com> wrote:
>>
>> > Hi, Preston
>> >
>> > The subject string is in Unicode (UTF-8 encoded), and the operation

>> is
>> > eq.
>> >
>> > When I test using a subject with only ASCII codes, it works. If I
>> > change it to Non-ASCII codes, the tasks can not be found.
>> >
>> > I guess the problem is in the filter in GW. When doing matching, it
>> > doesnot handle Unicode well.
>> >
>> >
>> > Preston Stephenson;1772857 Wrote:
>> >> A couple of comments. I don't know how to handle Ф
>> >> I would assume that would try to convert to a Unicode character.
>> >> In my case I would take that as the subject string.
>> >> The XML needs to be in UTF8. Also, your are doing eq on the

>> subject?
>> >> Are you saying the subject was one character? If not, you would

>> have
>> >> to use contains or begins.
>> >> ......
>> >>
>> >> Preston
>> >>
>> >>

0 Likes
lionfish Absent Member.
Absent Member.

Re: Can not find the task with a subject containing Unicode

Here is an example for your testing, 程序测试, the Chinese characters for "Program testing", can be written as 程序测试.

Another one in Japanese, "いいお天気です", for "It's good weather", can be written as いいお天気です.
0 Likes
lionfish Absent Member.
Absent Member.

Re: Can not find the task with a subject containing Unicode

Here is an example for your testing, 程序测试, the Chinese characters for "Program testing", can be written as &# 31243; &# 24207;&# 27979; &# 35797;.

Another one in Japanese, "いいお天気です", for "It's good weather", can be written as &# 12356; &# 12356;お &# 22825; &# 27671; &# 12391;&# 12377;.

Sorry, I insert a space between each "&#" and the value, otherwise they will be displayed as the same as the original string.
0 Likes
lionfish Absent Member.
Absent Member.

Re: Can not find the task with a subject containing Unicode

いいお天気です =
&# 12356;&# 12356;&# 12362;&# 22825;&# 27671;&# 12391;&# 12377;
0 Likes
Anonymous_User Absent Member.
Absent Member.

Re: Can not find the task with a subject containing Unicode

I wasn't sure you if wanted an example in Java.
Here is the simple test:
public void testUnicode() {
Mail mail = new Mail();
mail.setSubject( "\u7A0B\u5E8F \u6D4B\u8BD5" );
try {
m_main.getService().sendItemRequest( mail, m_main.getSessionId(),
m_main.getTrace() );
m_main.getService().getItemsRequest( "folders", null,
new Filter( new FilterEntry( FilterOp.eq, "subject", null,
"\u7A0B\u5E8F \u6D4B\u8BD5", null, null ) ),
null, 0, m_main.getSessionId(), m_main.getTrace() );
} catch ( Exception e ) {
e.printStackTrace();
}
}

Here is the edited SOAP trace of the create:
<?xml version="1.0" encoding="UTF-8"?>
<env:Envelope>
<env:Body>
<ns0:sendItemRequest>
<ns0:item xsi:type="ans1:Mail">
<ans1:subject>程序 测试</ans1:subject>
</ns0:item>
</ns0:sendItemRequest>
</env:Body>
</env:Envelope>

Here is the getItemsRequest with the filter:
<?xml version="1.0" encoding="UTF-8"?>
<env:Envelope >
<env:Body>
<ns0:getItemsRequest>
<ns0:container>folders</ns0:container>
<ns0:filter>
<ans1:element xsi:type="ans1:FilterEntry">
<ans1:op>eq</ans1:op>
<ans1:field>subject</ans1:field>
<ans1:value>程序 测试</ans1:value>
</ans1:element>
</ns0:filter>
<ns0:count>0</ns0:count>
</ns0:getItemsRequest>
</env:Body>
</env:Envelope>

Here is the reponse:
<?xml version="1.0" encoding="UTF-8"?>
<env:Envelope >
<env:Body>
<gwm:getItemsResponse>
<gwm:items>
<gwt:item xsi:type="gwt:Mail">

<gwt:id>49DF379D.domain.PO1.100.1776172.1.C95D.1@1:7.domain.PO1.100.0.1.0.1@
16</gwt:id>
<gwt:sid>51549</gwt:sid>
<gwt:version>1</gwt:version>
<gwt:modified>2009-04-10T18:12:13Z</gwt:modified>
<gwt:container>7.domain.PO1.100.0.1.0.1@16</gwt:container>
<gwt:created>2009-04-10T18:12:13Z</gwt:created>
<gwt:status>
<gwt:accepted>1</gwt:accepted>
<gwt:opened>1</gwt:opened>
<gwt:read>1</gwt:read>
</gwt:status>
<gwt:msgId>49DF379D.domain.PO1.100.1776172.1.C95D.1</gwt:msgId>
<gwt:clientMessageId>49DF8BFD.8C0 : 194 :
18298</gwt:clientMessageId>
<gwt:source>personal</gwt:source>
<gwt:delivered>2009-04-10T18:12:13Z</gwt:delivered>
<gwt:security>Normal</gwt:security>
<gwt:subject>程序 测试</gwt:subject>
<gwt:distribution>
<gwt:from>
<gwt:displayName>Preston stephenson</gwt:displayName>
<gwt:email>pstephenson@prestons.provo.novell.com</gwt:email>
<gwt:uuid>2D16B180-0922-0000-846C-82BD300F9E1C</gwt:uuid>
</gwt:from>
<gwt:sendoptions>
<gwt:statusTracking>None</gwt:statusTracking>
</gwt:sendoptions>
</gwt:distribution>
<gwt:options>
<gwt:priority>Standard</gwt:priority>
</gwt:options>
<gwt:size>256</gwt:size>

<gwt:retentionModified>2009-04-10T18:12:13Z</gwt:retentionModified>
</gwt:item>
</gwm:items>
<gwm:status>
<gwt:code>0</gwt:code>
</gwm:status>
</gwm:getItemsResponse>
</env:Body>
</env:Envelope>

Keep in mind that you need to have the fix for Unicode characters
in the subject. That fix will be in 7.0.3 HP3, 8.0.0 HP2 and
8.0.1. If you need a development build to test the fix, just respond
to me privately and I can give you a build.

Preston

>>> On Thursday, April 09, 2009 at 10:46 AM,

lionfish<lionfish@no-mx.forums.novell.com> wrote:

> Here is an example for your testing, 程序测试,
> the Chinese characters for "Program testing", can be written as &#
> 31243; &# 24207;&# 27979; &# 35797;.
>
> Another one in Japanese,
> "いいお天気です", for "It's
> good weather", can be written as &# 12356; &# 12356;お &# 22825;
> &# 27671; &# 12391;&# 12377;.
>
> Sorry, I insert a space between each "&#" and the value, otherwise they
> will be displayed as the same as the original string.

0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.