grouper-users - RE: [grouper-users] Fetching Stems with Umlauts
Subject: Grouper Users - Open Discussion List
List archive
- From: Chris Hyzer <>
- To: Mirko Tasler <>, "" <>
- Subject: RE: [grouper-users] Fetching Stems with Umlauts
- Date: Sat, 12 Sep 2009 01:02:12 -0400
- Accept-language: en-US
- Acceptlanguage: en-US
Sorry for the late reply.
First of all, do you have a grouper client build after march 31st?
https://bugs.internet2.edu/jira/browse/GRP-263
Second, I cant make this work on my computer, maybe my locale is wrong. I
cant even print out an umlaut if I tried. Actually, the client works fine in
eclipse, it prints it out fine. So try the latest 1.4 branch. Let me ask
you a question (or anyone).
I have a sample test java program to print out an umlaut: Test.java
public class Test {
public static void main(String[] args) {
System.out.println("ä");
}
}
When I run this in eclipse, it works fine.
When I run this in windows CMD, I get this (prints a sigma):
C:\mchyzer\isc\dev\grouper_v1_4\grouperClient\build\eclipseBin>java Test
Σ
When I run in linux, I get this (couple of "a" looking chars):
[mchyzer@flash
pennGroupsClient-1.4.3]$ java Test
ä
If someone can help me set my locale or whatever to make this program work (I
have already tried to do certain things to no avail), then I can help.
Otherwise, I hope the latest 1.4 branch works... :) btw, also make sure this
is set in the grouper.client.properties (or tweak it to whatever you want it
to be):
# this should probably be changed to UTF-8 for international charsets... for
US it can be: ISO-8859-1
grouperClient.default.fileEncoding = UTF-8
Thanks,
Chris
> -----Original Message-----
> From: Mirko Tasler
> [mailto:]
> Sent: Wednesday, September 02, 2009 4:29 AM
> To:
>
> Subject: [grouper-users] Fetching Stems with Umlauts
>
> Dear Grouper-Users,
>
> here at Freie Universität Berlin, we are creating Stems with umlauts
> using GrouperClient like in *1 with "test:umlautä".
> This works fine, and a quick "SELECT display_name FROM grouper_stems
> WHERE display_name LIKE 'test:%umlau%'" also equals to the originating
> stemName.
> However, when I try to look up this Stem with GrouperClient with *2,
> the found Stem name in the WsStem[] Array (fetched with
> found[0].getName()) has no umlauts but instead a char with the value
> "0xefbfbd"/65533 (i.e., invalid Unicode).
> The response from the Web Service at *3 seems correct.
> How do I fetch the correct name? Any help would be greatly appreciated!
>
> Thanks,
>
> Mirko Tasler
>
>
> *1 Code snippet saving Stem
> String stemName="test:umlautä";
> WsStem wsStem = new WsStem();
> wsStem.setName(stemName);
> WsStemToSave wsStemToSave = new WsStemToSave();
> wsStemToSave.setWsStemLookup(new WsStemLookup(stemName, null));
> wsStemToSave.setWsStem(wsStem);
> gcStemSave.addStemToSave(wsStemToSave);
> gcStemSave.assignTxType(GcTransactionType.NONE).execute();
>
> *2 Code snippet looking up Stem
> String parentName="test";
> WsStemQueryFilter wsStemQueryFilter = new WsStemQueryFilter();
> wsStemQueryFilter.setParentStemName(parentName);
>
> wsStemQueryFilter.setStemQueryFilterType("FIND_BY_PARENT_STEM_NAME");
> wsStemQueryFilter.setParentStemNameScope("ALL_IN_SUBTREE");
> GcFindStems gcFindStems = new GcFindStems();
> WsFindStemsResults result =
> gcFindStems.assignStemQueryFilter(wsStemQueryFilter).execute();
> WsStem[] found=result.getStemResults();
> int c=found[0].getName().charAt(found[0].getName().size()-1);
> (leads to c==65533, should be 228)
>
> *3 Response snippet from the WS
> <stemResults>
> <WsStem>
> <extension>umlaut[0xe4]</extension>
> <displayExtension>umlaut[0xe4]</displayExtension>
> <description>test:umlaut[0xe4]</description>
> <displayName>test:umlaut[0xe4]</displayName>
> <name>test:umlaut[0xe4]</name>
> <uuid>2ad6c0e2-8f0b-4cdc-acb7-04e142e2588e</uuid>
> </WsStem>
> </stemResults>
- Fetching Stems with Umlauts, Mirko Tasler, 09/02/2009
- RE: [grouper-users] Fetching Stems with Umlauts, Chris Hyzer, 09/12/2009
- Re: [grouper-users] Fetching Stems with Umlauts, Mirko Tasler, 09/14/2009
- RE: [grouper-users] Fetching Stems with Umlauts, Chris Hyzer, 09/14/2009
- Re: [grouper-users] Fetching Stems with Umlauts, Mirko Tasler, 09/15/2009
- RE: [grouper-users] Fetching Stems with Umlauts, Chris Hyzer, 09/15/2009
- Re: [grouper-users] Fetching Stems with Umlauts, Mirko Tasler, 09/15/2009
- RE: [grouper-users] Fetching Stems with Umlauts, Chris Hyzer, 09/14/2009
- Re: [grouper-users] Fetching Stems with Umlauts, Mirko Tasler, 09/14/2009
- RE: [grouper-users] Fetching Stems with Umlauts, Chris Hyzer, 09/12/2009
Archive powered by MHonArc 2.6.16.