<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<div class="moz-cite-prefix">Thanks Martin,<br>
<br>
I've finally solved the issue, actually it was due to a wrong
option set-up in the Java environment where the Java app was run,
dealing with the file.encoding. The application, which handles
successively the metadata creation & publication was giving an
Exception at metadata insertion time because of this encoding. So
nothing wrong with the JAXB marshalling actually.<br>
<br>
Anyway, i've taken the opportunity to learn a bit a more about
CharacterEscapeHandler which indeed could be useful to know.<br>
<br>
For the migration to Apache SIS, indeed i've planned to start it
soon.<br>
I will post message on Apache SIS mailing list if i face issues.<br>
<br>
Many thanks for your prompt support<br>
Emmanuel<br>
<br>
Le 21/01/2014 11:21, Martin Desruisseaux a écrit :<br>
</div>
<blockquote cite="mid:52DE4A34.60602@geomatys.fr" type="cite">
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
Hello Emmanuel<br>
<br>
Thanks for the links.<br>
<br>
<div class="moz-cite-prefix">Le 20/01/14 16:41, Emmanuel Blondel a
écrit :<br>
</div>
<blockquote cite="mid:52DD438D.3090503@gmail.com" type="cite">
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
<div class="moz-cite-prefix">(...snip...) Why the copyright is
not converted to ©? Same question for diacritics (see
spanish words).<br>
</div>
</blockquote>
Such conversions should not be necessary if the XML file is
encoded in UTF-8... However if someone wishes to force character
conversions, I found the following blog which gives a tip about
how to do that with JAXB:<br>
<br>
<a moz-do-not-send="true" class="moz-txt-link-freetext"
href="http://lauraliparulo.altervista.org/jaxb-part-5-xml-character-handler/">http://lauraliparulo.altervista.org/jaxb-part-5-xml-character-handler/</a><br>
<br>
If you choose this approach, you could define your own <tt>CharacterEscapeHandler</tt>
and set the property to the <tt>Marshaller</tt> created by Geotk.
Note however that the package name (<tt>com.sun.xml.bind.marshaller</tt>)
suggests that this is not an officially supported API. And if you
use the JAXB implementation bundled in the JDK rather than the
"endorsed" one, then the package name may be <tt>com.sun.xml.internal.bind.marshaller</tt>.<br>
<br>
<blockquote cite="mid:52DD438D.3090503@gmail.com" type="cite">
<div class="moz-cite-prefix"> (...snip...) I point you to the
code i use:<br>
- Metadata (where i use the copyright symbol in a citation
template): <a moz-do-not-send="true"
href="https://github.com/openfigis/gis-tools/blob/master/gis-metadata/gis-metadata/main/src/main/java/org/fao/fi/gis/metadata/GeographicEntityMetadata.java">https://github.com/openfigis/gis-tools/blob/master/gis-metadata/gis-metadata/main/src/main/java/org/fao/fi/gis/metadata/GeographicEntityMetadata.java</a>
(row: 332 - 345)<br>
- publisher (where i marshall to XML and publish the xml to
Geonetwork): <a moz-do-not-send="true"
href="https://github.com/openfigis/gis-tools/blob/master/gis-metadata/gis-metadata/publisher/src/main/java/org/fao/fi/gis/metadata/publisher/MetadataPublisher.java#L67">https://github.com/openfigis/gis-tools/blob/master/gis-metadata/gis-metadata/publisher/src/main/java/org/fao/fi/gis/metadata/publisher/MetadataPublisher.java#L67</a><br>
</div>
</blockquote>
<br>
I had a look at the code and it seems all right, so I think that
the issue is about configuring JAXB for example with the
above-cited <tt>CharacterEscapeHandler</tt>.<br>
<br>
Can I suggest something? :-) As you may know, we are migrating
Geotk to Apache SIS (<a moz-do-not-send="true"
class="moz-txt-link-freetext" href="http://sis.apache.org">http://sis.apache.org</a>).
If the only Geotk API that you are using is metadata, this part is
already available in Apache SIS 0.3. Future evolutions and bugs
fixes will happen on Apache side. Actually most metadata object
are already deleted from Geotk and replaced by reference to the
Apache classes. The metadata API is close to identical. If you
wish to migrate, the only thing that you need to do is to replace
your dependency in the pom.xml (if you are using Maven) by that
one (use "sis-metadata" instead than "sis-referencing"):<br>
<br>
<a moz-do-not-send="true" class="moz-txt-link-freetext"
href="http://sis.apache.org/downloads.html#maven">http://sis.apache.org/downloads.html#maven</a><br>
<br>
and replace "<tt>import org.geotoolkit...</tt>" by "<tt>import
org.apache.sis...</tt>" (most class names are identical). Some
exceptions are <tt>SimpleInternationalString</tt> which is
located in <tt>org.apache.sis.util.iso</tt> (an "<tt>iso</tt>"
sub-package has been added), and <tt>Anchor</tt> which is handled
in a slightly different way - I will help you with that one if you
are interested in the migration, ideally on the Apache SIS mailing
list if you agree.<br>
<br>
Our plan is to keep Geotk as a "laboratory" for Apache SIS. Geotk
would be built on top of SIS, and Geotk classes are expected to
migrate to SIS when they are considered mature enough. When a
Geotk class migrate to SIS, the Geotk one is deprecated before
deletion.<br>
<br>
Regards,<br>
<br>
Martin<br>
<br>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
Geotoolkit mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Geotoolkit@lists.osgeo.org">Geotoolkit@lists.osgeo.org</a>
<a class="moz-txt-link-freetext" href="http://lists.osgeo.org/mailman/listinfo/geotoolkit">http://lists.osgeo.org/mailman/listinfo/geotoolkit</a></pre>
</blockquote>
<br>
<br>
<div class="moz-signature">-- <br>
<span style="font: 80% Arial,sans-serif;"><b>Emmanuel Blondel</b><br>
</span>
<span style="font: 80% Arial,sans-serif;">GIS Consultant<br>
</span>
<span style="font: 80% Arial,sans-serif;">Engineer in Agronomy
& Environment<br>
<br>
</span>
<span style="font: 80% Arial,sans-serif;">Geographic Information
Systems<br>
in Agronomy - Environment - Fisheries<br>
Email: <a class="moz-txt-link-abbreviated" href="mailto:emmanuel.blondel1@gmail.com">emmanuel.blondel1@gmail.com</a> - <a class="moz-txt-link-abbreviated" href="mailto:Emmanuel.Blondel@fao.org">Emmanuel.Blondel@fao.org</a><br>
</span>
<a href="http://fr.linkedin.com/in/emmanuelblondel1"
style="text-decoration:none;"><span style="font: 80%
Arial,sans-serif; color:#0783B6;"><img
src="cid:part6.04050303.03090007@gmail.com" alt="View my
LinkedIn profile" style="vertical-align:middle" width="20"
height="15" border="0">View my LinkedIn profile</span></a></div>
</body>
</html>