79831947

Date: 2025-11-27 17:04:07
Score: 1
Natty:
Report link

Had the same issue, I wrote a xquery program to generate an .csv for opening in Excel.
The german Umlauts öäü are ok in CSV but Excel uses the wrong encoding.

The following declaration in the xquery file for adding a BOM https://de.wikipedia.org/wiki/Byte_Order_Mark fixes the problem:

declare option    saxon:output "method=text";
declare option    saxon:output "byte-order-mark=1";

I use saxon, but the declaration should work for different systems also, as they are defined in the W3C Serialization specification http://www.w3.org/TR/xslt-xquery-serialization/

Reasons:
  • Has code block (-0.5):
  • Unregistered user (0.5):
  • Low reputation (1):
Posted by: Markus