Special characters

3
We're using a vcard downloader in mendix and for some reason special characters like é aren't correctly formatted. For instance, a name like Piqué is Piqué in the vcard. How can I manipulate the encoding. The vcard is created by a java action
asked
4 answers
4

Mendix uses UTF-8 for string values, but by default Outlook doesn't use this character set when reading vCards. To change this behaviour, explicitly declare the character set of all vCard fields containing UTF-8 characters by adding "CHARSET=utf-8" to your exported vCard files.

The other option is not exporting the vCard using UTF-8, but this will most likely cause some of the special characters to be "lost" in the conversion.

answered
2

Try to change the name like: name = new name ("Piqu\u00e9");

With some "if then else" clauses and preformated strings with the special characters you can make this dynamic.

answered
1

Oke, but is there no way to set the encoding in java. Like in XML:

Otherwise we have to create a different exceptions for all the special characters we're using.

answered
1

Are you starting the runtime with a java flag, see this question for details.

answered