Hi Carsten
 
Looks like there is an issue here - how are you adding the relationship?  Do
you have some sample code so we can reproduce this?
 
Also, do you have the platform character encoding for the Windows and Linux
platforms you are using?  If you are able to output Charset.defaultCharset()
for both and let us know these that would also help.
 
Thanks
Steve
 
 

-----Original Message-----
From: [email protected] [mailto:[email protected]] 
Sent: 04 September 2009 05:00
To: [email protected]
Subject: [Fedora-commons-developers] Problem adding literal
relationshipcontainng non-ascii characters



Hi,

 

I try to add a literal relationship with the object below to a fedora
object. If running fedora on windows this throws an exception about invalid
UTF-8 characters in ValidationUtility.validateReservedDatastream, and on
linux it succeeds but the relationship string gets corrupted. I noticed two
suspicious lines in the Fedora source code in
SimpleDOWriter#addRelationship:

String xmlContent = new String(out.toByteArray());

And

                newds.xmlContent = xmlContent.getBytes();

which both do seem to ignore the character set of the String.     

 

The relationship object I want to add:

 

Apis mellifera capensis and Apis mellifera scutellata are very difficult to
separate on morphological grounds - the best method seems to be to identify
the geographical location of the source of the population.  Apis mellifera
capensis is generally confined to the south west corner of South Africa and
along the southern coast to Port Elizabeth; Apis mellifera scutellata can be
found throughout most of the remaining areas of South Africa (See Figure 5
in Hepburn and Radloff in Weblinks)

 

 There appears to be three subspecies of Apis mellifera in South Africa -
A. m. capensis, A. m. scutellata and an unnamed "mountain form" (Hepburn &
Radloff 2002).

 

Workers of A. m. capensis have on average more than 5 ovarioles/ovaries and
a spermathecal diameter of 0.30mm; the spermathecas of workers of other
species of Apis are vestigial.

 

Apis mellifera capensis workers can invade the nests of African bee A. m.
scutellata, parasitise these colonies, causing colony death.

 

The same relationship object retrieved back from fedora (on linux, not
possible on Windows as fedora throws exception when adding):

 

Apis mellifera capensis and Apis mellifera scutellata are very difficult to
separate on morphological grounds ??? the best method seems to be to
identify the geographical location of the source of the population.  Apis
mellifera capensis is generally confined to the south west corner of South
Africa and along the southern coast to Port Elizabeth; Apis mellifera
scutellata can be found throughout most of the remaining areas of South
Africa (See Figure 5 in Hepburn and Radloff in Weblinks)

 

 There appears to be three subspecies of Apis mellifera in South Africa -
A. m. capensis, A. m. scutellata and an unnamed ???mountain form??? (Hepburn
& Radloff 2002).

 

Workers of A. m. capensis have on average more than 5 ovarioles/ovaries and
a spermathecal diameter of 0.30mm; the spermathecas of workers of other
species of Apis are vestigial.

 

Apis mellifera capensis workers can invade the nests of African bee A. m.
scutellata, parasitise these colonies, causing colony death.

------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
Fedora-commons-developers mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/fedora-commons-developers

Reply via email to