Re: A Minimal PicoLisp DB/GUI Application, Telephone field

2015-01-14 Thread Rowan Thorpe
On 2015/01/14-14:37, Luis P. Mendes wrote:
 Hi,
 
 2015-01-14 12:09 GMT+00:00 Alexander Burger a...@software-lab.de:
 
  I see. So Norway has different systematics with telephone numbers.
 
  I don't understand them, though. In Germany we have the rule that both
  0049 123 456 and +49 123 456 are the same as 0123 456.
 The 00 to + conversion is of no problem, but the 0 leading local or
 domestic numbers seems to be a feature of some countries, but not of
 others.

There are even more variations though, including for international calling
code:

 from Australia: 0011 + country code + area code + ...
 from USA: 011 + country code + area code + ...

-- 
Rowan Thorpe
PGP fingerprint:
 BB0A 0787 C0EE BDD8 7F97  3D30 49F2 13A5 265D CCBD

There is a great difference between worry and concern. A worried person sees
a problem, and a concerned person solves a problem.
 - Harold Stephens
-- 
UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe


Re: A Minimal PicoLisp DB/GUI Application, Telephone field

2015-01-14 Thread Luis P. Mendes
Hi,

2015-01-14 12:09 GMT+00:00 Alexander Burger a...@software-lab.de:

 I see. So Norway has different systematics with telephone numbers.

 I don't understand them, though. In Germany we have the rule that both
 0049 123 456 and +49 123 456 are the same as 0123 456.
The 00 to + conversion is of no problem, but the 0 leading local or
domestic numbers seems to be a feature of some countries, but not of
others.


Luis
-- 
UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe


Re: A Minimal PicoLisp DB/GUI Application, Telephone field

2015-01-14 Thread Jon Kleiser
Hi Alex,

On 14. Jan, 2015, at 13:09, Alexander Burger a...@software-lab.de wrote:

 Hi Jon,
 
 I don’t quite get this. I have done as you suggested, (locale NO
 no) and leading 0, so I can now enter a phone number as 099887766. You
 say it will be stored internally with leading 47 instead of that 0, but
 
 Right. You see that if you look directly into the DB.
 
 
 when I put the mouse over that phone-pencil icon, it seems that
 tel:099887766 is what will be used (and that’s also the href I see in
 the inspector).
 ...
 If I try to dial 022852804 from my mobile, I get number not in use.
 
 I see. So Norway has different systematics with telephone numbers.
 
 I don't understand them, though. In Germany we have the rule that both
 0049 123 456 and +49 123 456 are the same as 0123 456.
 
 A number without a leading zero is a local number (within the same city,
 but that's almost obsolete these days as you can take your number with
 you when you move or change your provider, so you can't rely on that).
 
 The '+TelField' (based on the functions 'telStr' and 'expTel') handles
 this. What are the exact rules for Norway? And how can we handle this
 flexibly?
 
 ♪♫ Alex
 — 

I think this page describes Norwegian telephone numbers quite well:
http://en.wikipedia.org/wiki/Telephone_numbers_in_Norway

It also seems that the Danish numbers are somewhat similar:
http://en.wikipedia.org/wiki/Telephone_numbers_in_Denmark

I may not be the right person to say how we can handle this flexibly. ;-)
I don’t know if it can be of any help, but here is Google’s common Java, C++ 
and JavaScript library for parsing, formatting, storing and validating 
international phone numbers:
https://github.com/googlei18n/libphonenumber

/Jon

Re: A Minimal PicoLisp DB/GUI Application, Telephone field

2015-01-14 Thread Alexander Burger
Hi Jon, Luis, Rowan,

thanks!

I see that this problem is non-trivial. We need to extend the
localization files loc/??.l

Probably some functional expression or pattern needs to be stored there,
in addition to (or as a replacement of) the country code '*CtryCode'.

Perhaps the Google library gives the necessary information. I'll take a
look asap. Any further input welcome!

♪♫ Alex
-- 
UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe


Re: A Minimal PicoLisp DB/GUI Application, Telephone field

2015-01-14 Thread Henrik Sarvell
Isn't this a non-issue, simply enter and store all numbers regardless
of location with country code + number without leading zero, eg
4912345678?

Will work for all countries everywhere, I never store numbers without
the country code in my mobile nowadays and always works regardless if
I'm in said country or not.



On Wed, Jan 14, 2015 at 5:23 PM, Alexander Burger a...@software-lab.de wrote:
 Hi Jon, Luis, Rowan,

 thanks!

 I see that this problem is non-trivial. We need to extend the
 localization files loc/??.l

 Probably some functional expression or pattern needs to be stored there,
 in addition to (or as a replacement of) the country code '*CtryCode'.

 Perhaps the Google library gives the necessary information. I'll take a
 look asap. Any further input welcome!

 ♪♫ Alex
 --
 UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe
--
UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe


Re: A Minimal PicoLisp DB/GUI Application, Telephone field

2015-01-14 Thread Alexander Burger
On Wed, Jan 14, 2015 at 05:52:02PM +0100, Henrik Sarvell wrote:
 Isn't this a non-issue, simply enter and store all numbers regardless
 of location with country code + number without leading zero, eg
 4912345678?

Yes, as I said, simply use +TextField instead of +TelField.

However, local customers will complain if they have to handle such
unwieldy numbers :)

♪♫ Alex
-- 
UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe


Re: A Minimal PicoLisp DB/GUI Application, Telephone field

2015-01-14 Thread Alexander Burger
Hi Jon,

 I don’t quite get this. I have done as you suggested, (locale NO
 no) and leading 0, so I can now enter a phone number as 099887766. You
 say it will be stored internally with leading 47 instead of that 0, but

Right. You see that if you look directly into the DB.


 when I put the mouse over that phone-pencil icon, it seems that
 tel:099887766 is what will be used (and that’s also the href I see in
 the inspector).
 ...
 If I try to dial 022852804 from my mobile, I get number not in use.

I see. So Norway has different systematics with telephone numbers.

I don't understand them, though. In Germany we have the rule that both
0049 123 456 and +49 123 456 are the same as 0123 456.

A number without a leading zero is a local number (within the same city,
but that's almost obsolete these days as you can take your number with
you when you move or change your provider, so you can't rely on that).

The '+TelField' (based on the functions 'telStr' and 'expTel') handles
this. What are the exact rules for Norway? And how can we handle this
flexibly?

♪♫ Alex
-- 
UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe


Re: A Minimal PicoLisp DB/GUI Application, Telephone field

2015-01-14 Thread Alexander Burger
On Wed, Jan 14, 2015 at 01:09:12PM +0100, Alexander Burger wrote:
 The '+TelField' (based on the functions 'telStr' and 'expTel') handles
 this. What are the exact rules for Norway? And how can we handle this
 flexibly?

Alternatively, of course, you could replace '+TelField' with
'+TextField'. Then the GUI won't do anything with the telephone numbers.

♪♫ Alex
-- 
UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe