You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucenenet.apache.org by "Itamar Syn-Hershko (JIRA)" <ji...@apache.org> on 2014/02/21 11:54:23 UTC

[jira] [Resolved] (LUCENENET-533) StringValue of NumberField is localized

     [ https://issues.apache.org/jira/browse/LUCENENET-533?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Itamar Syn-Hershko resolved LUCENENET-533.
------------------------------------------

    Resolution: Fixed

> StringValue of NumberField is localized
> ---------------------------------------
>
>                 Key: LUCENENET-533
>                 URL: https://issues.apache.org/jira/browse/LUCENENET-533
>             Project: Lucene.Net
>          Issue Type: Bug
>          Components: Lucene.Net Core
>    Affects Versions: Lucene.Net 3.0.3, Lucene.Net 3.6, Lucene.Net 4.0
>            Reporter: Morten Gorm Madsen
>            Assignee: Itamar Syn-Hershko
>            Priority: Minor
>              Labels: easyfix
>   Original Estimate: 0.5h
>  Remaining Estimate: 0.5h
>
> The StringValue property of Lucene.Net.Documents.NumericField returns a localized string value (ie. confusion about the decimal separation character). IMHO it should be a following the invariant culture whenever possible.
> Suggested fix:
> public override string StringValue
> {
>   get {
>     if (fieldsData == null)
>       return null;
>     if (fieldsData is IConvertible)
>       return ((IConvertible)fieldsData).ToString(CultureInfo.InvariantCulture);
>     
>     return fieldsData.ToString();
>   }
> }



--
This message was sent by Atlassian JIRA
(v6.1.5#6160)