Bug 662 - Code formatting throw "System.InvalidOperationException: Tried to remove non ws chars" with one unicode char
Summary: Code formatting throw "System.InvalidOperationException: Tried to remove non ...
Status: RESOLVED FIXED
Alias: None
Product: Xamarin Studio
Classification: Desktop
Component: C# Binding ()
Version: 2.6 RC 1
Hardware: PC Windows
: High minor
Target Milestone: ---
Assignee: Mike Krüger
URL:
Depends on:
Blocks:
 
Reported: 2011-09-07 09:48 UTC by neilbgr
Modified: 2011-11-16 09:45 UTC (History)
2 users (show)

Tags: Code formatting unicode ascii ansi char inline condition string
Is this bug a regression?: ---
Last known good build:


Attachments
A simple project of code example (3.00 KB, application/zip)
2011-09-07 09:48 UTC, neilbgr
Details


Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.


Please create a new report on Developer Community or GitHub with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:
Status:
RESOLVED FIXED

Description neilbgr 2011-09-07 09:48:31 UTC
Created attachment 258 [details]
A simple project of code example

Code formatting throw "System.InvalidOperationException: Tried to remove non ws chars" in this case :

using System;

namespace MonodevelopFormattingBug
{
	class MainClass
	{
		public static void Main (string[] args)
		{
			bool vTest = true;
			Console.WriteLine ((vTest ? "One unicode char like é doesn't accepted in inline condition" : "One unicode char like à doesn't accepted in inline condition"));			
		}
	}
}

Code formatting stop at the "é" char.
Comment 1 Mike Krüger 2011-11-16 09:45:27 UTC
Fixed in master. It was caused by an encoding error. Encoding.Default is UTF8 on mono - always. But different on MS.NET. And we used UTF8 at one occassion and Encoding.Default in another.

That why it failed.