﻿<?xml version="1.0" encoding="utf-8"?><rss version="2.0"><channel><title>Ayende @ Rahien</title><link>http://ayende.com</link><description>Ayende @ Rahien</description><copyright>Copyright (C) Ayende Rahien  2004 - 2021 (c) 2026</copyright><ttl>60</ttl><item><title>Rob Relyea commented on WPF tripwires, beware of uncommon culture infos</title><description>Ayende-
  
Bertrand let us know about this issue you have found.  Thanks Bertrand.
  
  
We did this QFE this year, and we intended to fix the entire issue...but we'll dig into your example, and go see what we find.
  
  
.NET 4 Beta2 will contain our .NET 4 version of this QFE.
  
  
Sounds, from your error string, that it is complaining about a LinearGradientBrush.EndPoint...which is of type Point, which means PointConverter is the one not working well.
  
  
We'll get back to you soon on that.
  
  
XAML parsing, since v3 uses en-us, and not invariant.  Unfortunately, en-us can be customized by a user who changes settings in the control panel.  Our QFE is to continue to use en-us (for best compat), but to make it so that user overrides will no longer apply.
  
It is possible that one of our type converters is still using the normal en-us, in which this problem would still show up.
  
  
Thanks for raising this issue...we realize it is a critical issue, which is why we worked on the earlier fix.
  
  
Thanks, Rob
  
  
Rob Relyea | WPF &amp; Xaml Language Team
  
robrelyea.com | /blog | /wpf | /xaml
  
</description><link>http://ayende.com/4150/wpf-tripwires-beware-of-uncommon-culture-infos#comment18</link><guid>http://ayende.com/4150/wpf-tripwires-beware-of-uncommon-culture-infos#comment18</guid><pubDate>Mon, 14 Sep 2009 23:09:36 GMT</pubDate></item><item><title>Ayende Rahien commented on WPF tripwires, beware of uncommon culture infos</title><description>thanks
</description><link>http://ayende.com/4150/wpf-tripwires-beware-of-uncommon-culture-infos#comment17</link><guid>http://ayende.com/4150/wpf-tripwires-beware-of-uncommon-culture-infos#comment17</guid><pubDate>Tue, 01 Sep 2009 18:43:34 GMT</pubDate></item><item><title>Bertrand Le Roy commented on WPF tripwires, beware of uncommon culture infos</title><description>I've asked. I'll report here when I hear back from them.
</description><link>http://ayende.com/4150/wpf-tripwires-beware-of-uncommon-culture-infos#comment16</link><guid>http://ayende.com/4150/wpf-tripwires-beware-of-uncommon-culture-infos#comment16</guid><pubDate>Tue, 01 Sep 2009 18:40:06 GMT</pubDate></item><item><title>Ayende Rahien commented on WPF tripwires, beware of uncommon culture infos</title><description>Bertrand
  
I would like to know if this really does affect only en-US, so yes, thank you
</description><link>http://ayende.com/4150/wpf-tripwires-beware-of-uncommon-culture-infos#comment15</link><guid>http://ayende.com/4150/wpf-tripwires-beware-of-uncommon-culture-infos#comment15</guid><pubDate>Sun, 30 Aug 2009 07:02:40 GMT</pubDate></item><item><title>Sergey Shishkin commented on WPF tripwires, beware of uncommon culture infos</title><description>I wonder why Xaml parser is not using InvariantCulture for things that aren't supposed to be localized.
</description><link>http://ayende.com/4150/wpf-tripwires-beware-of-uncommon-culture-infos#comment14</link><guid>http://ayende.com/4150/wpf-tripwires-beware-of-uncommon-culture-infos#comment14</guid><pubDate>Fri, 28 Aug 2009 21:21:28 GMT</pubDate></item><item><title>Ivan commented on WPF tripwires, beware of uncommon culture infos</title><description>@ Rik Hemsley
  
Yeah, you're right, W3C requires period to be decimal indicator, see 
[http://www.w3.org/TR/xmlschema-2/#decimal](http://www.w3.org/TR/xmlschema-2/#decimal)</description><link>http://ayende.com/4150/wpf-tripwires-beware-of-uncommon-culture-infos#comment13</link><guid>http://ayende.com/4150/wpf-tripwires-beware-of-uncommon-culture-infos#comment13</guid><pubDate>Fri, 28 Aug 2009 08:24:23 GMT</pubDate></item><item><title>Bertrand Le Roy commented on WPF tripwires, beware of uncommon culture infos</title><description>Ah, so there is a hotfix then. That is encouraging as it means it will probably be fixed for good in 4.0. Does it make sense for me to follow-up on the part of the problem that is not addressed by the hotfix? We can follow-up offline if you want.
</description><link>http://ayende.com/4150/wpf-tripwires-beware-of-uncommon-culture-infos#comment12</link><guid>http://ayende.com/4150/wpf-tripwires-beware-of-uncommon-culture-infos#comment12</guid><pubDate>Fri, 28 Aug 2009 05:02:08 GMT</pubDate></item><item><title>Ayende Rahien commented on WPF tripwires, beware of uncommon culture infos</title><description>John,
  
Thank you, I added the same condition
</description><link>http://ayende.com/4150/wpf-tripwires-beware-of-uncommon-culture-infos#comment11</link><guid>http://ayende.com/4150/wpf-tripwires-beware-of-uncommon-culture-infos#comment11</guid><pubDate>Fri, 28 Aug 2009 04:56:37 GMT</pubDate></item><item><title>Ayende Rahien commented on WPF tripwires, beware of uncommon culture infos</title><description>Bertrand,
  
You are absolutely correct that this isn't an ideal solution, not by a long shot.
  
The bug seems to be in the framework, as specified in the hotfix.
  
I changed the code so it would only revert the culture when the root culture in en-US.
  
  
</description><link>http://ayende.com/4150/wpf-tripwires-beware-of-uncommon-culture-infos#comment10</link><guid>http://ayende.com/4150/wpf-tripwires-beware-of-uncommon-culture-infos#comment10</guid><pubDate>Fri, 28 Aug 2009 04:55:50 GMT</pubDate></item><item><title>Gerke Geurts commented on WPF tripwires, beware of uncommon culture infos</title><description>As far as I am aware WPF parses floating point values using invariant culture. Otherwise the use of a custom converter class would be a pretty clean option to perform conversion.
</description><link>http://ayende.com/4150/wpf-tripwires-beware-of-uncommon-culture-infos#comment9</link><guid>http://ayende.com/4150/wpf-tripwires-beware-of-uncommon-culture-infos#comment9</guid><pubDate>Thu, 27 Aug 2009 23:28:42 GMT</pubDate></item><item><title>Frank commented on WPF tripwires, beware of uncommon culture infos</title><description>So, WPF does seem to have a bug in its internals where it doesn't use the invariant culture to parse XAML? Ouch.
</description><link>http://ayende.com/4150/wpf-tripwires-beware-of-uncommon-culture-infos#comment8</link><guid>http://ayende.com/4150/wpf-tripwires-beware-of-uncommon-culture-infos#comment8</guid><pubDate>Thu, 27 Aug 2009 18:45:15 GMT</pubDate></item><item><title>John Meyer commented on WPF tripwires, beware of uncommon culture infos</title><description>Since the hotfix specifically states that it only applies to US English installations of Windows, shouldn't your function start with:
  
  
if (CultureInfo.CurrentCulture.Name != "en-US")
  
    return;
  
  
as the idea isn't to change the culture, but only to get rid of any customizations the user might have done in their control panel settings.  I've had to add those 2 culture lines to unit test setup methods as time strings have failed to match because I have my system set to display in 24 hour time instead of 12.  This situation looks very similar.
</description><link>http://ayende.com/4150/wpf-tripwires-beware-of-uncommon-culture-infos#comment7</link><guid>http://ayende.com/4150/wpf-tripwires-beware-of-uncommon-culture-infos#comment7</guid><pubDate>Thu, 27 Aug 2009 18:30:55 GMT</pubDate></item><item><title>Bertrand Le Roy commented on WPF tripwires, beware of uncommon culture infos</title><description>mmh. French is certainly less common than en-us but calling it uncommon seems like a stretch. It would be interesting to have more context around that as the sledgehammer solution of reverting to en-us seems a little heavy handed without it. It would also help understanding if that's a bug in framework code or in NH Prof... Or at all (the document may be plain invalid).
</description><link>http://ayende.com/4150/wpf-tripwires-beware-of-uncommon-culture-infos#comment6</link><guid>http://ayende.com/4150/wpf-tripwires-beware-of-uncommon-culture-infos#comment6</guid><pubDate>Thu, 27 Aug 2009 17:52:37 GMT</pubDate></item><item><title>Daniel commented on WPF tripwires, beware of uncommon culture infos</title><description>Does it work just to set CurrentCulture?  It's been a while since I had to know the difference, but it seems like the parser would just use one or the other, and it would make sense if it used CurrentCulture and let your app use CurrentUICulture...
  
  
InvariantCulture would probably be better, and is really what the parser should be using, I would think...
</description><link>http://ayende.com/4150/wpf-tripwires-beware-of-uncommon-culture-infos#comment5</link><guid>http://ayende.com/4150/wpf-tripwires-beware-of-uncommon-culture-infos#comment5</guid><pubDate>Thu, 27 Aug 2009 15:22:40 GMT</pubDate></item><item><title>Rik Hemsley commented on WPF tripwires, beware of uncommon culture infos</title><description>Ivan, isn't that because XML Schema requires dot to be decimal separator?
  
  
Perhaps this is the case with XAML too?
</description><link>http://ayende.com/4150/wpf-tripwires-beware-of-uncommon-culture-infos#comment4</link><guid>http://ayende.com/4150/wpf-tripwires-beware-of-uncommon-culture-infos#comment4</guid><pubDate>Thu, 27 Aug 2009 14:17:12 GMT</pubDate></item><item><title>Blake Niemyjski commented on WPF tripwires, beware of uncommon culture infos</title><description>Hello,
  
  
There might be a CultureInfo override where you can pass in CultureInfo.InvariantCulture, which is much cleaner.
  
  
Thanks
  
-Blake Niemyjski
  
</description><link>http://ayende.com/4150/wpf-tripwires-beware-of-uncommon-culture-infos#comment3</link><guid>http://ayende.com/4150/wpf-tripwires-beware-of-uncommon-culture-infos#comment3</guid><pubDate>Thu, 27 Aug 2009 12:49:36 GMT</pubDate></item><item><title>Ivan commented on WPF tripwires, beware of uncommon culture infos</title><description>So funny, just yesterday I've found that XML Schema Validator in .NET uses hard-coded InvariantCulture number format which means it requires dot to be decimal separator when validating values of double type :\
</description><link>http://ayende.com/4150/wpf-tripwires-beware-of-uncommon-culture-infos#comment2</link><guid>http://ayende.com/4150/wpf-tripwires-beware-of-uncommon-culture-infos#comment2</guid><pubDate>Thu, 27 Aug 2009 12:39:38 GMT</pubDate></item><item><title>Krzysztof Kozmic commented on WPF tripwires, beware of uncommon culture infos</title><description>So what you're telling me is that WPF can't parse floating point numbers if decimal separator is something else than a dot? You can't be serious!
</description><link>http://ayende.com/4150/wpf-tripwires-beware-of-uncommon-culture-infos#comment1</link><guid>http://ayende.com/4150/wpf-tripwires-beware-of-uncommon-culture-infos#comment1</guid><pubDate>Thu, 27 Aug 2009 12:06:44 GMT</pubDate></item></channel></rss>