locked
Why does Windows.Globalization.DateTimeFormatting.DateTimeFormatter include left-to-right mark E2 80 8E in formatted string?

    Question

  • Outputting such a formatted string to an XML file results in E2 80 8E prefixed to each character

    It should just print: 16.03.2015 2:22 to the xml

    Monday, March 16, 2015 1:30 AM

All replies

  • Hint: what happens if you remove those markers and display the date string in mixed RTL and LTR text?
    Monday, March 16, 2015 5:02 AM
    Owner
  • How would I remove them? I tried formatter.format(new Date()).replace(/[\x00-\x1F\x7F-\x9F]/g, "")

    but it does not work.

    btw: this editor here sucks

    Monday, March 16, 2015 9:10 AM
  • For test purposes you can use any editor. You can even just type in the string as you'd like to see it.

    When you run that string with mixed text you'll see why the LTR mark is necessary.

    Monday, March 23, 2015 11:24 PM
    Owner
  • Rob I fail to understand how this addresses my problem. How can I prevent WinRT formatting APIs to insert those control characters? I don't want them in my text. I need to print out the formatted text in an XML (UTF-8) stream and I don't need LTR markers in there.
    Wednesday, March 25, 2015 11:54 AM