Skip to content
This repository has been archived by the owner on Jan 2, 2019. It is now read-only.

Support other decimal point symbols #206

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

bbrdaric
Copy link

Regex to support comma "," and raised period "·" as decimal point symbols for TYPE_NUMERIC.

http://mathworld.wolfram.com/DecimalPoint.html
https://en.wikipedia.org/wiki/Decimal#Decimal_fractions

This is very important when reading HTML and writing to Excel.

Regex to support comma "," and raised period "·" as decimal point symbols for TYPE_NUMERIC.

http://mathworld.wolfram.com/DecimalPoint.html
https://en.wikipedia.org/wiki/Decimal#Decimal_fractions

This is very important when reading HTML and writing to Excel.
@MarkBaker
Copy link
Member

I'm not sure that this should be included in the default value binder, or if it should be in the advanced value binder, or even in a new custom value binder; but certainly you should be using the advanced value binder or a custom binder if you're working with the HTML reader (if only for handling dates)

@bbrdaric
Copy link
Author

Yes, this whole regex could all go to advanced value binder.

I see there are comma separated format number constants in NumberFormat.php, but these are not used anywhere.

NumberFormat.php

const FORMAT_NUMBER_COMMA_SEPARATED1    = '#,##0.00';
const FORMAT_NUMBER_COMMA_SEPARATED2    = '#,##0.00_-';

On the other hand, these are all valid numeric types

  • 5
  • .5
  • 5.5
  • ,5
  • 5,5
  • ·5
  • 5·5

I am just not sure if Excel supports raised dot symbol "·".

It just depends on Excel (Windows) Region and Language settings (Number format) so for reading HTML it may be good to support some Localization parameter / setting like element lang attribute.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants