[Mono-dev] Behavior change in XmlWriterSettings/XmlTextWriter

Atsushi Eno atsushieno at veritas-vos-liberabit.com
Mon Sep 28 16:58:52 UTC 2015


MSDN documentation describes the behavior how .NET Framework works on
Windows, hence it says \r\n. As the referencesource is explicitly
implemented, it is NOT the case on non-Windows platform.

If you are unhappy about Microsoft behavior, you should file a bug to
Microsoft. referencesource is not for reporting issues though (as its
README explicitly says so).

Atsushi Eno

On 2015年09月28日 23:15, Martin Potter wrote:
> The default for XamlWriterSettings NewLineChars was changed from "\r\n" to
> "\n" when you imported the reference source and is what is present on the
> 4.2 branch. This is not what the previous behavior was, nor what the
> documentation on MSDN,
> https://msdn.microsoft.com/en-us/library/system.xml.xmlwritersettings.newli
> nechars(v=vs.110).aspx, states.
> 
> "The character string to use for line breaks. This can be set to any
> string value. However, to ensure valid XML, you should specify only valid
> white space characters, such as space characters, tabs, carriage returns,
> or line feeds. The default is \r\n (carriage return, new line)."
> 
> ― Martin
> 
> On 9/28/15, 8:08 AM, "Atsushi Eno" <atsushieno at veritas-vos-liberabit.com>
> wrote:
> 
>> Current Microsoft-based implementation is the correct one and it's been
>> there in post-4.0 versions.
>>
>> Atsushi Eno
>>
>> On 2015年09月28日 22:46, Martin Potter wrote:
>>> Atsushi,
>>>
>>> Were you (or someone else) going to get this fixed before 4.2 is ready
>>> to
>>> ship?
>>>
>>> Thank you,
>>> Martin
>>>
>>> On 9/8/15, 8:03 PM, "Atsushi Eno" <atsushieno at veritas-vos-liberabit.com>
>>> wrote:
>>>
>>>> I had no idea when that commit was made, but that change was wrong.
>>>> Microsoft behavior is the one we should use in that case.
>>>>
>>>> Atsushi Eno
>>>>
>>>> On 2015年09月09日 01:50, Martin Potter wrote:
>>>>> Way back in 2012, this commit
>>>>>
>>>>>
>>>>> https://github.com/mono/mono/commit/9215ddf7ade5f0f0f54c2adb7b165e4e3e7
>>>>> 74
>>>>> 33b
>>>>>
>>>>>
>>>>> <https://github.com/LogosBible/mono/commit/9215ddf7ade5f0f0f54c2adb7b16
>>>>> 5e
>>>>> 4e3e77433b> changed
>>>>> the default newline in XmlWriterSettings to be "\r\n” to be compatible
>>>>> with MS (which some of our tests rely on). It appears that when the
>>>>> reference source was imported in
>>>>>
>>>>>
>>>>> https://github.com/mono/mono/commit/4990b4c47b8fe1b219c64884fad98d58615
>>>>> 46
>>>>> a05#diff-5561e6ab8de20ec168dcb1f7b415b353,
>>>>> it was changed back to be platform specific. Was this an intentional
>>>>> change?
>>>>>
>>>>> Thank you,
>>>>> Martin
>>>>>
>>>>>
>>>>>
>>>>> _______________________________________________
>>>>> Mono-devel-list mailing list
>>>>> Mono-devel-list at lists.ximian.com
>>>>> http://lists.ximian.com/mailman/listinfo/mono-devel-list
>>>>>
>>>>
>>>
>>>
>>>
>>
> 
> 
> 



More information about the Mono-devel-list mailing list