You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucenenet.apache.org by "David Kallesen (JIRA)" <ji...@apache.org> on 2007/06/28 10:04:25 UTC
[jira] Created: (LUCENENET-45) CultureInfo VS Formats
CultureInfo VS Formats
----------------------
Key: LUCENENET-45
URL: https://issues.apache.org/jira/browse/LUCENENET-45
Project: Lucene.Net
Issue Type: Bug
Environment: .NET 2.0
Reporter: David Kallesen
Priority: Trivial
When using System.Single.Parse(value) we should thing on "." vs ",".
Example:
fms = (float) System.Single.Parse(fuzzySlop.image.Substring(1));
should be changes to something like:
fms = (float) System.Single.Parse(fuzzySlop.image.Substring(1), new System.Globalization.CultureInfo("en-US"));
// David
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
RE: [jira] Created: (LUCENENET-45) CultureInfo VS Formats
Posted by "Michael J. Primeaux" <mj...@i-dynamics-corporation.com>.
David,
I would need a bit more context as to the problem domain but by default you should consider using the current thread's UI culture, which would change the below code to be:
fms = (float) System.Single.Parse(fuzzySlop.image.Substring(1), Thread.CurrentThread.CurrentUICulture);
Also, I see you are casting to a float; why not just use float.Parse(...)?
Regards,
Michael
-----Original Message-----
From: David Kallesen (JIRA) [mailto:jira@apache.org]
Sent: Thursday, June 28, 2007 3:04 AM
To: lucene-net-dev@incubator.apache.org
Subject: [jira] Created: (LUCENENET-45) CultureInfo VS Formats
CultureInfo VS Formats
----------------------
Key: LUCENENET-45
URL: https://issues.apache.org/jira/browse/LUCENENET-45
Project: Lucene.Net
Issue Type: Bug
Environment: .NET 2.0
Reporter: David Kallesen
Priority: Trivial
When using System.Single.Parse(value) we should thing on "." vs ",".
Example:
fms = (float) System.Single.Parse(fuzzySlop.image.Substring(1));
should be changes to something like:
fms = (float) System.Single.Parse(fuzzySlop.image.Substring(1), new System.Globalization.CultureInfo("en-US"));
// David
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
RE: [jira] Created: (LUCENENET-45) CultureInfo VS Formats
Posted by Digy <di...@gmail.com>.
Hi David,
Which version of Lucene.Net do you use?
This bug in QueryParser is fixed in 2.0.0.4(final release)
See the issue http://issues.apache.org/jira/browse/LUCENENET-36
DIGY
-----Original Message-----
From: David Kallesen (JIRA) [mailto:jira@apache.org]
Sent: Thursday, June 28, 2007 11:04 AM
To: lucene-net-dev@incubator.apache.org
Subject: [jira] Created: (LUCENENET-45) CultureInfo VS Formats
CultureInfo VS Formats
----------------------
Key: LUCENENET-45
URL: https://issues.apache.org/jira/browse/LUCENENET-45
Project: Lucene.Net
Issue Type: Bug
Environment: .NET 2.0
Reporter: David Kallesen
Priority: Trivial
When using System.Single.Parse(value) we should thing on "." vs ",".
Example:
fms = (float) System.Single.Parse(fuzzySlop.image.Substring(1));
should be changes to something like:
fms = (float) System.Single.Parse(fuzzySlop.image.Substring(1), new System.Globalization.CultureInfo("en-US"));
// David
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
RE: [jira] Created: (LUCENENET-45) CultureInfo VS Formats
Posted by Digy <di...@gmail.com>.
Hi David,
Which version of Lucene.Net do you use?
This bug in QueryParser is fixed in 2.0.0.4(final release)
See the issue http://issues.apache.org/jira/browse/LUCENENET-36
DIGY
-----Original Message-----
From: David Kallesen (JIRA) [mailto:jira@apache.org]
Sent: Thursday, June 28, 2007 11:04 AM
To: lucene-net-dev@incubator.apache.org
Subject: [jira] Created: (LUCENENET-45) CultureInfo VS Formats
CultureInfo VS Formats
----------------------
Key: LUCENENET-45
URL: https://issues.apache.org/jira/browse/LUCENENET-45
Project: Lucene.Net
Issue Type: Bug
Environment: .NET 2.0
Reporter: David Kallesen
Priority: Trivial
When using System.Single.Parse(value) we should thing on "." vs ",".
Example:
fms = (float) System.Single.Parse(fuzzySlop.image.Substring(1));
should be changes to something like:
fms = (float) System.Single.Parse(fuzzySlop.image.Substring(1), new System.Globalization.CultureInfo("en-US"));
// David
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Closed: (LUCENENET-45) CultureInfo VS Formats
Posted by "George Aroush (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/LUCENENET-45?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
George Aroush closed LUCENENET-45.
----------------------------------
Resolution: Fixed
Assignee: George Aroush
I believe you are referring to the file QueryParser.cs. If so, it's fixed already in Lucene.Net 2.0 like so:
fms = (float) System.Single.Parse(fuzzySlop.image.Substring(1).Replace(".", System.Globalization.CultureInfo.CurrentCulture.NumberFormat.NumberDecimalSeparator));
-- George
> CultureInfo VS Formats
> ----------------------
>
> Key: LUCENENET-45
> URL: https://issues.apache.org/jira/browse/LUCENENET-45
> Project: Lucene.Net
> Issue Type: Bug
> Environment: .NET 2.0
> Reporter: David Kallesen
> Assignee: George Aroush
> Priority: Trivial
>
> When using System.Single.Parse(value) we should thing on "." vs ",".
> Example:
> fms = (float) System.Single.Parse(fuzzySlop.image.Substring(1));
> should be changes to something like:
> fms = (float) System.Single.Parse(fuzzySlop.image.Substring(1), new System.Globalization.CultureInfo("en-US"));
> // David
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.