[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
Re: [mdt-bpmn2.dev] BPMN2 file encoding
|
Yes, if you want to use UTF-8 as the default encoding for BPMN2 resources (a good idea, IMO), I suggest setting the encoding in the resource factory, much like UML2 does (see
org.eclipse.uml2.uml.internal.resource.UMLResourceFactoryImpl).
Cheers,
Kenn
On Fri, Jul 16, 2010 at 3:34 AM, Antoine Toulme
<antoine@xxxxxxxxxxxxxxx> wrote:
It was me then - I didn't set options on save. Thanks for the refresher.
On Fri, Jul 16, 2010 at 00:28, Hille-Doering, Reiner
<reiner.hille-doering@xxxxxxx> wrote:
Wow, you are still awake(or already… ) J
Encoding is controlled by on option for the Resource, e.g.:
XmlResource resource = new BPMN2ResourceFactory().createResource();
…
Map<Object, Object> options = new HashMap<Object,
Object>();
- options.put(XMLResource.OPTION_ENCODING,
initialObjectCreationPage.getEncoding());
resource.save(options);
Of cause I could include the options by default to the “@generated
not” section in BPMN2ResourceFactory.
Von:
antoine.toulme@xxxxxxxxx [mailto:antoine.toulme@xxxxxxxxx] Im Auftrag von Antoine
Toulme
Gesendet: Freitag, 16. Juli 2010 09:23
An: Hille-Doering, Reiner
Cc: BPMN2 Developers Mailing List
Betreff: Re: [mdt-bpmn2.dev] BPMN2 file encoding
I am creating models programmatically, so I might be missing
something. If we define a content type, we should be able to set the default
encoding.
I also have seen some weird things when creating models
programmatically, it looks like the wrong local name is used and the type of
the object is passed in a xsi attribute. I'll open a bug with a test case.
On Fri, Jul 16, 2010 at 00:20, Hille-Doering, Reiner <reiner.hille-doering@xxxxxxx>
wrote:
Absolutely. I assume that you
talk about the fact that I removed the second page of the “New BPMN
2” Wizard. In this page the user can choose the root element and the
encoding of the new file. I have set the root element fixed to DocumentRoot,
containing a Defintions. I also assumed that encoding will default to UTF-8,
which is obviously not the case. I will fix it.
Just a side note, I'm seeing the encoding of the
resources we create is ASCII by default.
I suggest we move it to UTF-8 to avoid issues with
characters. Does that seem reasonable ?
_______________________________________________
mdt-bpmn2.dev mailing list
mdt-bpmn2.dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/mdt-bpmn2.dev