Hello
When I change my machine’s regional to Swedish from English I get below exception when I try to parse a valid Well Known Text:
{“Input string was not in a correct format.”}
And this is the stacktrace:
at System.Number.ParseDouble(String value, NumberStyles options, NumberFormatInfo numfmt)
at System.String.System.IConvertible.ToDouble(IFormatProvider provider)
at System.Convert.ChangeType(Object value, Type conversionType, IFormatProvider provider)
at xRM=.dRo=.iBo=(Type t)
at xRM=.mxo=.oRo=(IList tokens)
at xRM=.mxo=.nho=(IList tokens, Boolean skipExtraParenthesis)
at xRM=.mxo=.nRo=(IList tokens, Boolean skipExtraParenthesis)
at xRM=.mxo=.qBo=(IList tokens)
at xRM=.mxo=.rRo=(IList tokens)
at xRM=.mxo=.pho=(IList tokens)
at xRM=.mxo=.cRY=(TextReader reader)
at xRM=.mxo=.cRY=(String wellKnownText)
at ThinkGeo.MapSuite.Core.BaseShape.CreateShapeFromWellKnownData(String wellKnownText)
The input Well Known Text is:
MULTILINESTRING ((439013.9999 113773.00025, 439095.00005 113945))
Which seems to be valid.
We have set the UI culture in our application’s startup to British English:
protected
override
void
OnStartup(StartupEventArgs e)
{
try
{
var currentUiCulture =
new
CultureInfo(
“en-GB”
,
true
);
Thread.CurrentThread.CurrentCulture = currentUiCulture;
Thread.CurrentThread.CurrentUICulture = currentUiCulture;
base
.OnStartup(e);
When I comment out those above lines everything works fine but it doesn’t when with set CurrentCulture and CuttentUICulture.
It’s strange as I tried to replicate it in a light sample and I couldn’t. But hopefully, the error message and stackstrace will help you to find out the problem?
My MapSuite version is 9.0.0.55
Thanks,
Shahin