-
Notifications
You must be signed in to change notification settings - Fork 19
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
International area code ignored #193
Comments
See https://github.com/andig/carddav2fb/blob/master/config.example.php#L100. Seems our default settings arent very good and we should replace with 0 instead of empty? |
Oh dear, I'm sorry, I didn't notice I could just adjust the config.php. Now it works perfectly! Again thanks a lot! =) |
@obnys here a suggestion: 'phoneReplaceCharacters' => [ // are processed consecutively. Order decides!
'(' => '', // delete separators
')' => '',
'/' => '',
'-' => '',
' ' => '',
'+491' => '01', // domestic numbers without country code
'+492' => '02',
'+493' => '03',
'+494' => '04',
'+495' => '05',
'+496' => '06',
'+497' => '07',
'+498' => '08',
'+499' => '09',
'+49' => '',
'+' => '00' // normalize foreign numbers
] |
Thank you @blacksenator =)
Do you think I would really need to add an entry for each area code digit from 1-9? |
Think so. Would you kindly open a PR? |
That depends on your source data and what you want to receive. I just made a few tests with my data and only this works for me: 'phoneReplaceCharacters' => [ // are processed consecutively. Order decides!
'(' => '', // delete separators
')' => '',
'/' => '',
'-' => '',
' ' => '',
'+49 1' => '01', // domestic numbers without area code
'+49 2' => '02',
'+49 3' => '03',
'+49 4' => '04',
'+49 5' => '05',
'+49 6' => '06',
'+49 7' => '07',
'+49 8' => '08',
'+49 9' => '09',
'+491' => '01',
'+492' => '02',
'+493' => '03',
'+494' => '04',
'+495' => '05',
'+496' => '06',
'+497' => '07',
'+498' => '08',
'+499' => '09',
'+49' => '',
'+' => '00' // normalize foreign numbers
] @andig - I never thought about this line - so I tried to find information about how |
The thing is that We're not using a regex here. Therefore:
gives
if you omit the second replacement you'll get
which is ugly. So remember the variant with the space. Would like a see a PR for improving the default config ;) |
Oki, I made a pull request and somehow it landed at jens-maus. I hope I did it correct. Sorry, never did that before and I have zero experience with GitHub :-P |
Please use this repo as target- github allows to select that.
… Am 20.01.2020 um 22:15 schrieb obnys ***@***.***>:
Oki, I made a pull request and somehow it landed at jens-maus. I hope I did it correct. Sorry, never did that before and I have zero experience with GitHub :-P
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or unsubscribe.
|
I have lost track of who is waiting for whom with a PR! @andig When I wrote the line "I never thought about this line ..." I had overlooked the fact that it was |
Ping @obnys would you mind to open another PR against this repo? |
I can't see a reason keeping this issue open |
Greetings,
since import without FTP is working, I noticed today, that the international area code is beeing ignored with the imported data.
e.g. +49 1234 987654 has been imported as 1234 987654, so the leading "0" has not been added while the international area code has been ignored.
Are there intensions to add this? Otherwise I would just use 0049 1234 987654 or leave the area code aside as long as the number is in the same country.
The text was updated successfully, but these errors were encountered: