plane icon Welcome to Microsoft Flight Simulator’s SDK Q&A Platform!

You have questions regarding the SDK? DevMode Tools? SimConnect? You would like to submit an idea for future improvements, seek help or exchange knowledge? You’re in the right place.

Please take a moment to read the platform’s guidelines before you get started!

question

rhumbaflappy avatar image
rhumbaflappy asked FlyingRaccoon answered

What is the proper XML encoding?

The SDK contradicts itself regarding XML encoding:

IMPORTANT! When creating or editing any XML file, you must ensure that it is saved using a UTF-8 BOM encoding! Any other encoding may cause issues, especially if the add-on is destined for publishing on the Xbox.

then later:


Editing Files

When creating or editing any XML file, you must ensure that it is saved using a UTF-8 encoding (without BOM). Any other encoding may cause issues when published. Also keep in mind that XML files with an <?xml> header should also specify "utf-8" for the encoding attribute, for example:

<?xml version="1.0" encoding="UTF-8"?>

This does not encode the file itself, but does provide a hint to the text parser that the file is using this encoding. To encode the file correctly, you can use the options within the text editor that you use. For example, in Notepad++:

1628087336885.png


So which is it? UTF-8 or UTF-8-BOM?


.xml FIles


documentation
1628087336885.png (8.7 KiB)
10 |10000 characters needed characters left characters exceeded

Up to 5 attachments (including images) can be used with a maximum of 4.8 MiB each and 23.8 MiB total.

1 Answer

· Write an Answer
FlyingRaccoon avatar image
FlyingRaccoon answered

Hello.

This is a typo in the first message. It should be encoded without BOM.
Thanks for letting us know.

Regards,
Sylvain

10 |10000 characters needed characters left characters exceeded

Up to 5 attachments (including images) can be used with a maximum of 4.8 MiB each and 23.8 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 5 attachments (including images) can be used with a maximum of 4.8 MiB each and 23.8 MiB total.