<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[Infinity Code Forum — OnlineMapsXML invariant culture fix]]></title>
	<link rel="self" href="https://forum.infinity-code.com/extern.php?action=feed&amp;tid=640&amp;type=atom" />
	<updated>2018-10-24T09:20:55Z</updated>
	<generator>PunBB</generator>
	<id>https://forum.infinity-code.com/viewtopic.php?id=640</id>
		<entry>
			<title type="html"><![CDATA[Re: OnlineMapsXML invariant culture fix]]></title>
			<link rel="alternate" href="https://forum.infinity-code.com/viewtopic.php?pid=4091#p4091" />
			<content type="html"><![CDATA[<p>Ok it&#039;s just when changing from Unity 2017 to 2018, language changed from .Net 3.5.x to .Net 4.x<br />and automatically, System.Globalization.CultureInfo.CurrentCulture change from &quot;en-US&quot; to &quot;fr-FR&quot; for us ...<br />But yes a solution is to force System.Globalization.CultureInfo.CurrentCulture to Invariant.<br />Thanks</p>]]></content>
			<author>
				<name><![CDATA[RaphBen]]></name>
				<uri>https://forum.infinity-code.com/profile.php?id=823</uri>
			</author>
			<updated>2018-10-24T09:20:55Z</updated>
			<id>https://forum.infinity-code.com/viewtopic.php?pid=4091#p4091</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: OnlineMapsXML invariant culture fix]]></title>
			<link rel="alternate" href="https://forum.infinity-code.com/viewtopic.php?pid=4088#p4088" />
			<content type="html"><![CDATA[<p>Hello.</p><p>I did not know about it.<br />Please send a link to the source of this information.</p><p>If this is true, it will be a big pain for all developers of assets.</p><p>The best way to work around this, at least for now:<br /></p><div class="codebox"><pre><code>Thread.CurrentThread.CurrentCulture = System.Globalization.CultureInfo.InvariantCulture;</code></pre></div>]]></content>
			<author>
				<name><![CDATA[Alex Vertax]]></name>
				<uri>https://forum.infinity-code.com/profile.php?id=2</uri>
			</author>
			<updated>2018-10-24T08:31:55Z</updated>
			<id>https://forum.infinity-code.com/viewtopic.php?pid=4088#p4088</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: OnlineMapsXML invariant culture fix]]></title>
			<link rel="alternate" href="https://forum.infinity-code.com/viewtopic.php?pid=4086#p4086" />
			<content type="html"><![CDATA[<p>Hello,</p><p>Thanks for this fix, it saved me some time, but it&#039;s not the only one in the plugin now.<br />In Unity 2018.3, the default conversion is now Culture.CurrentCulture !!!<br />I&#039;m French and all floating or double values are parsed with an expected &quot;,&quot; by default ... <img src="https://forum.infinity-code.com/img/smilies/sad.png" width="15" height="15" alt="sad" /> sad<br />I need to patch your plugin to use InvariantCulture each time a Double is parsed.<br />Could you take care of that changement from Unity 2018.3 in your next versions please ?<br />Thanks</p>]]></content>
			<author>
				<name><![CDATA[RaphBen]]></name>
				<uri>https://forum.infinity-code.com/profile.php?id=823</uri>
			</author>
			<updated>2018-10-24T08:16:55Z</updated>
			<id>https://forum.infinity-code.com/viewtopic.php?pid=4086#p4086</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: OnlineMapsXML invariant culture fix]]></title>
			<link rel="alternate" href="https://forum.infinity-code.com/viewtopic.php?pid=2756#p2756" />
			<content type="html"><![CDATA[<p>Nice ! Thanks !</p>]]></content>
			<author>
				<name><![CDATA[jean-christophe.romain]]></name>
				<uri>https://forum.infinity-code.com/profile.php?id=510</uri>
			</author>
			<updated>2017-09-05T14:04:45Z</updated>
			<id>https://forum.infinity-code.com/viewtopic.php?pid=2756#p2756</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: OnlineMapsXML invariant culture fix]]></title>
			<link rel="alternate" href="https://forum.infinity-code.com/viewtopic.php?pid=2755#p2755" />
			<content type="html"><![CDATA[<p>Hello.</p><p>Thanks for your modification.<br />The next version of Online Maps will contain this.</p>]]></content>
			<author>
				<name><![CDATA[Alex Vertax]]></name>
				<uri>https://forum.infinity-code.com/profile.php?id=2</uri>
			</author>
			<updated>2017-09-05T13:31:50Z</updated>
			<id>https://forum.infinity-code.com/viewtopic.php?pid=2755#p2755</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[OnlineMapsXML invariant culture fix]]></title>
			<link rel="alternate" href="https://forum.infinity-code.com/viewtopic.php?pid=2753#p2753" />
			<content type="html"><![CDATA[<p>Hi !</p><p>This is not a bug request, rather a small evolution request to update OnlineMapsXML.cs in order to use invariantCulture while parsing some types (i.e Doubles, by example) that causes exception if not done.</p><p>The modification concern Lines 628-630 in \Infinity Code\Online Maps\Scripts\XML\OnlineMapsXML.cs<br />Would it be possible to change :</p><p>[...]<br />&nbsp; &nbsp; &nbsp; &nbsp; try<br />&nbsp; &nbsp; &nbsp; &nbsp; {<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; MethodInfo method = OnlineMapsReflectionHelper.GetMethod(underlyingType, &quot;Parse&quot;, new[] {typeof (string)});<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if (method != null) obj = (T)method.Invoke(null, new[] { value });<br />&nbsp; &nbsp; &nbsp; &nbsp; }<br />[...]</p><p>TO</p><p>[...]<br />&nbsp; &nbsp; &nbsp; &nbsp; try<br />&nbsp; &nbsp; &nbsp; &nbsp; {<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; MethodInfo method = OnlineMapsReflectionHelper.GetMethod(underlyingType, &quot;Parse&quot;, new Type[] { typeof(string), typeof(CultureInfo) });<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; CultureInfo c = CultureInfo.InvariantCulture;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if (method != null) obj = (T)method.Invoke(null, new object[] { value, c });<br />&nbsp; &nbsp; &nbsp; &nbsp; }<br />[...]</p><p>..This would prevent us to patch OnlineMapsXML code every time we update the pluggin <img src="https://forum.infinity-code.com/img/smilies/wink.png" width="15" height="15" alt="wink" /></p><p>Thanks !</p>]]></content>
			<author>
				<name><![CDATA[jean-christophe.romain]]></name>
				<uri>https://forum.infinity-code.com/profile.php?id=510</uri>
			</author>
			<updated>2017-09-04T14:24:27Z</updated>
			<id>https://forum.infinity-code.com/viewtopic.php?pid=2753#p2753</id>
		</entry>
</feed>
