Re: [PHP] Re: Help: Validate Domain Name by Regular Express

2011-01-10 Thread tedd

At 12:23 PM -0500 1/9/11, Daniel Brown wrote:

On Sun, Jan 9, 2011 at 11:58, tedd  wrote:


 For example --

 http://xn--19g.com


 > -- is square-root dot com. In all browsers except Safari, PUNYCODE is shown

 in the address bar, but in Safari it's shown as –.com


Not sure if that's a typo or an issue in translation while the
email was being relayed through the tubes, but –.com directs to
xn--wqa.com here.

--



Daniel et al:

Translation of Unicode characters by various 
software programs is unpredictable -- this 
includes email applications.


While I can send/receive ˆ (square root) through 
my email program (Eudora) what your email program 
displays to you can be (as shown) something 
completely different. The mapping of the 
code-points (i.e., square-root) to what your 
program displays (much like a web site) depends 
upon how your email program works. If your email 
program has the correct Char Set and will map it 
to the what was actually received, then the 
character will be displayed correctly. If not, 
then things like –.com happen.


Unfortunately, this mapping problem has not been 
of great importance for most applications. As it 
is now, most applications work for English 
speaking people and that seems good enough, or so 
many manufactures think. However, as the "rest of 
the world" starts using applications (and logging 
on to the net) it will obviously become more 
advantageous for manufactures to make their 
software work correctly for other-than-English 
languages. Apple is doing that and last year the 
majority of their income came from overseas 
(i.e., other than USA).


The mapping of other than English characters was 
the problem addressed by the IDNS WG, where I 
added my minor contribution circa 2000. 
Unfortunately, homographic issues were not 
resolved by the WG. However, a solution was 
proposed (I entitled as the "Fruit-loop" 
solution) which was to color-code (flag) the 
characters in the address bar of a browser IF the 
URL contained a mixed Char Set. Unfortunately, 
that solution was not pursued and instead Browser 
manufactures choose to show raw PUNYCODE, which 
was never intended to be seen by the end users. A 
giant step backwards IMO.


Cheers,

tedd

--
---
http://sperling.com/

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Re: Help: Validate Domain Name by Regular Express

2011-01-10 Thread tedd

At 11:41 AM -0600 1/9/11, Donovan Brooke wrote:

Daniel Brown wrote:

On Sun, Jan 9, 2011 at 11:58, tedd  wrote:


For example --

http://xn--19g.com

-- is square-root dot com. In all browsers except Safari...


but yes, the actual square root character appears in safari only.

Interesting!
Donovan


Donovan:

Yes, Safari shows ALL Unicode Code-Points (i.e., 
Characters) as they were intended.


Here's a couple of examples:

http://xn--u2g.com

http://xn--w4h.com

Interesting enough, the above characters cannot 
be typed directly from a key-board, but are shown 
correctly by a Browser.


However as I said, these can only be seen 
correctly by the Safari browser. If you use IE, 
then the URL's will be shown as PUNYCODE -- M$ 
has a "better idea".


What I also find interesting is that there are no 
restrictions for using IDNS names in email 
addresses. However, even Apple's Mail program 
restricts these to standard ASCII.


IOW, an email address of t...@ˆ.com is perfectly 
legal (and will work), but no email application 
will allow it.


Cheers,

tedd
--
---
http://sperling.com/

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Re: Help: Validate Domain Name by Regular Express

2011-01-10 Thread Steve Staples
On Mon, 2011-01-10 at 11:39 -0500, tedd wrote:
> At 11:41 AM -0600 1/9/11, Donovan Brooke wrote:
> >Daniel Brown wrote:
> >>On Sun, Jan 9, 2011 at 11:58, tedd  wrote:
> >>>
> >>>For example --
> >>>
> >>>http://xn--19g.com
> >>>
> >>>-- is square-root dot com. In all browsers except Safari...
> >
> >but yes, the actual square root character appears in safari only.
> >
> >Interesting!
> >Donovan
> 
> Donovan:
> 
> Yes, Safari shows ALL Unicode Code-Points (i.e., 
> Characters) as they were intended.
> 
> Here's a couple of examples:
> 
> http://xn--u2g.com
> 
> http://xn--w4h.com
> 
> Interesting enough, the above characters cannot 
> be typed directly from a key-board, but are shown 
> correctly by a Browser.
> 
> However as I said, these can only be seen 
> correctly by the Safari browser. If you use IE, 
> then the URL's will be shown as PUNYCODE -- M$ 
> has a "better idea".
> 
> What I also find interesting is that there are no 
> restrictions for using IDNS names in email 
> addresses. However, even Apple's Mail program 
> restricts these to standard ASCII.
> 
> IOW, an email address of t...@ˆ.com is perfectly 
> legal (and will work), but no email application 
> will allow it.
> 
> Cheers,
> 
> tedd
> -- 
> ---
> http://sperling.com/
> 
on my Ubuntu box, I can copy and past the √ (square-root) character and
it displays properly in he address bar on google chome, but it
translates it back to the http://xn--19g.com and doesn't show anything
else (well... the page loads...LOL)

so did you register the xn--19q.com address knowing that it would
work/translate to √.com (square-root) ?

-- 

Steve Staples
Web Application Developer
519.258.2333 x8414


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Re: Help: Validate Domain Name by Regular Express

2011-01-10 Thread tedd

At 11:57 AM -0500 1/10/11, Steve Staples wrote:

On Mon, 2011-01-10 at 11:39 -0500, tedd wrote:

 > >>>For example --

 >>>
 >>>http://xn--19g.com
 >>>

 > >>>-- is square-root dot com.

on my Ubuntu box, I can copy and past the ˆ (square-root) character and
it displays properly in he address bar on google chome, but it
translates it back to the http://xn--19g.com and doesn't show anything
else (well... the page loads...LOL)

so did you register the xn--19q.com address knowing that it would
work/translate to ˆ.com (square-root) ?

--

Steve Staples


Steve:

When I was associated with the IDNS WG (not a 
member), there came a time where the "powers that 
be" wanted to "try out" their solutions, namely 
PUNYCODE. As such, we were allowed to register 
IDNS domain names on a trial basis. The 
conditions of the trial were that we could 
register any IDNS we wanted (at $100 a pop) and 
if at anytime over the following year our names 
caused problems, then we would forfeit our names 
without compensation. In short, a $100 per-name 
bet!


At that time, I registered almost 30 names. 
Fortunately, all of my names passed and I was 
permitted to keep them. Unfortunately, all 
browser manufactures (except Safari) negated some 
of the work done by the IDNS WG and as a result 
PUNYCODE is shown instead of the actual 
characters intended.


I continue to hold on to my domain names because 
I believe that the PUNYCODE problem will be 
resolved someday and my single character domain 
names will be valuable. Please realize that 
single character ASCII characters are estimated 
to sell for over a million dollars each -- you 
may want to review this:


http://www.cbsnews.com/stories/2005/11/28/tech/main1080245.shtml

In any event, this is out of the main stream of 
PHP. However, it should just be noted that 
Unicode characters, which started this thread, 
are very involved and many software manufactures 
are not implementing solutions correctly. In 
contrast, the PHP community has provided numerous 
Multibyte String Functions (mb_) for dealing with 
Unicode. So, our PHP applications can correctly 
deal with what Unicode provides that are far 
exceed simple ASCII.


Cheers,

tedd

--
---
http://sperling.com/

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] First PHP job

2011-01-10 Thread Donovan Brooke

Hello!, .. will try to keep this short!
I've been a long time lurker but minimal poster. I made it a new years 
resolution to finally take on PHP jobs and now have my first one (with a 
completion date in a couple weeks!).


I've been scripting in another language for many years and do know a 
thing or two.. but anticipate bothering the list a few times in the near 
future... hope that is fine with you all.


I'm just about through Larry Ullman's "PHP" third edition that I started
a couple days ago. Good book to start with I think, even for folks who
have some kind of head start in Web Programming. I'm able to skim over
a lot of it.

I don't know how you all remain sane in dealing with quotes workarounds 
in echo/print statements, having to open/close PHP parsing using ?> all the time, and having to deal with array's for just about 
everything... but I'm sure I'll get used to it and it will become second 
nature at some point. ;-)


..Just turned 40 and had to finally change my monitor settings from 1920 
X 1200 to 1344 X 840, which was like breathing fresh air after being in 
a coal mine for 8 hours... I should have done that 5 years ago

I think.

Cheers, to a new year, and new tricks for old dogs! ;-),

Donovan




--
D Brooke

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] First PHP job

2011-01-10 Thread tedd

At 12:02 PM -0600 1/10/11, Donovan Brooke wrote:

Hello!, .. will try to keep this short!
I've been a long time lurker but minimal poster. I made it a new 
years resolution to finally take on PHP jobs and now have my first 
one (with a completion date in a couple weeks!).


I've been scripting in another language for many years and do know a 
thing or two.. but anticipate bothering the list a few times in the 
near future... hope that is fine with you all.


I'm just about through Larry Ullman's "PHP" third edition that I started
a couple days ago. Good book to start with I think, even for folks who
have some kind of head start in Web Programming. I'm able to skim over
a lot of it.

I don't know how you all remain sane in dealing with quotes 
workarounds in echo/print statements, having to open/close PHP 
parsing using  all the time, and having to deal with array's 
for just about everything... but I'm sure I'll get used to it and it 
will become second nature at some point. ;-)


..Just turned 40 and had to finally change my monitor settings from 
1920 X 1200 to 1344 X 840, which was like breathing fresh air after 
being in a coal mine for 8 hours... I should have done that 5 years 
ago

I think.

Cheers, to a new year, and new tricks for old dogs! ;-),

Donovan



Donovan:

As for 40 == Old dogs? What are you talking about? I've got underwear 
older than that -- forty is young!


As for monitor settings, I have three monitors each set at 1680 x 
1050 giving me a total of 5040 x 1050. My setup is almost enough for 
me -- I wish it was taller.


As for Larry's books, he's a good writer and I've purchased all of 
his books. I like "PHP and MySQL For Dynamic Web Sites" and "PHP 
Advanced For the World Wide Web". If you know those, you'll do 
alright.


As for "" just remember that HTML is the glue that holds 
everything together. Write good HTML and your PHP will naturally fit 
in where it's supposed to go.


Good luck on your job.

Cheers,

tedd

--
---
http://sperling.com/

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] First PHP job

2011-01-10 Thread Paul M Foster
On Mon, Jan 10, 2011 at 12:02:51PM -0600, Donovan Brooke wrote:

> Hello!, .. will try to keep this short!
> I've been a long time lurker but minimal poster. I made it a new years
> resolution to finally take on PHP jobs and now have my first one (with a
> completion date in a couple weeks!).
> 
> I've been scripting in another language for many years and do know a
> thing or two.. but anticipate bothering the list a few times in the near
> future... hope that is fine with you all.
> 
> I'm just about through Larry Ullman's "PHP" third edition that I started
> a couple days ago. Good book to start with I think, even for folks who
> have some kind of head start in Web Programming. I'm able to skim over
> a lot of it.
> 
> I don't know how you all remain sane in dealing with quotes workarounds
> in echo/print statements, having to open/close PHP parsing using  ?> all the time, and having to deal with array's for just about
> everything... but I'm sure I'll get used to it and it will become second
> nature at some point. ;-)

That stuff's easy. I'm still trying to wrap my wits around the crazy way
functions are handled in Javascript. I know of no other language which
treats functions the way Javascript does.

Wait until you get to PHP's automatic casting of strings to numbers under
the proper conditions. You'll scratch your head for quite a while once
you hit that one.

Paul

-- 
Paul M. Foster
http://noferblatz.com


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] First PHP job

2011-01-10 Thread Steve Staples
On Mon, 2011-01-10 at 16:21 -0500, Paul M Foster wrote:
> On Mon, Jan 10, 2011 at 12:02:51PM -0600, Donovan Brooke wrote:
> 
> > Hello!, .. will try to keep this short!
> > I've been a long time lurker but minimal poster. I made it a new years
> > resolution to finally take on PHP jobs and now have my first one (with a
> > completion date in a couple weeks!).
> > 
> > I've been scripting in another language for many years and do know a
> > thing or two.. but anticipate bothering the list a few times in the near
> > future... hope that is fine with you all.
> > 
> > I'm just about through Larry Ullman's "PHP" third edition that I started
> > a couple days ago. Good book to start with I think, even for folks who
> > have some kind of head start in Web Programming. I'm able to skim over
> > a lot of it.
> > 
> > I don't know how you all remain sane in dealing with quotes workarounds
> > in echo/print statements, having to open/close PHP parsing using  > ?> all the time, and having to deal with array's for just about
> > everything... but I'm sure I'll get used to it and it will become second
> > nature at some point. ;-)
> 
> That stuff's easy. I'm still trying to wrap my wits around the crazy way
> functions are handled in Javascript. I know of no other language which
> treats functions the way Javascript does.
> 
> Wait until you get to PHP's automatic casting of strings to numbers under
> the proper conditions. You'll scratch your head for quite a while once
> you hit that one.
> 
> Paul
> 
> -- 
> Paul M. Foster
> http://noferblatz.com
> 
> 
or the ($needle, $haystack) vs ($haystack, $needle)... i still get it
screwed up... thankfully php.net/{function_name} is easy to use :P



-- 

Steve Staples
Web Application Developer
519.258.2333 x8414


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] First PHP job

2011-01-10 Thread Paul M Foster
On Mon, Jan 10, 2011 at 04:55:20PM -0500, Steve Staples wrote:

> On Mon, 2011-01-10 at 16:21 -0500, Paul M Foster wrote:
> > On Mon, Jan 10, 2011 at 12:02:51PM -0600, Donovan Brooke wrote:
> >
> > > Hello!, .. will try to keep this short!
> > > I've been a long time lurker but minimal poster. I made it a new years
> > > resolution to finally take on PHP jobs and now have my first one (with a
> > > completion date in a couple weeks!).
> > >
> > > I've been scripting in another language for many years and do know a
> > > thing or two.. but anticipate bothering the list a few times in the near
> > > future... hope that is fine with you all.
> > >
> > > I'm just about through Larry Ullman's "PHP" third edition that I started
> > > a couple days ago. Good book to start with I think, even for folks who
> > > have some kind of head start in Web Programming. I'm able to skim over
> > > a lot of it.
> > >
> > > I don't know how you all remain sane in dealing with quotes workarounds
> > > in echo/print statements, having to open/close PHP parsing using  > > ?> all the time, and having to deal with array's for just about
> > > everything... but I'm sure I'll get used to it and it will become second
> > > nature at some point. ;-)
> >
> > That stuff's easy. I'm still trying to wrap my wits around the crazy way
> > functions are handled in Javascript. I know of no other language which
> > treats functions the way Javascript does.
> >
> > Wait until you get to PHP's automatic casting of strings to numbers under
> > the proper conditions. You'll scratch your head for quite a while once
> > you hit that one.
> >
> > Paul
> >
> > --
> > Paul M. Foster
> > http://noferblatz.com
> >
> >
> or the ($needle, $haystack) vs ($haystack, $needle)... i still get it
> screwed up... thankfully php.net/{function_name} is easy to use :P
> 

Oh hell yeah! I know there's a rule about it. I just don't know what it
is.

Paul

-- 
Paul M. Foster
http://noferblatz.com


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] First PHP job

2011-01-10 Thread Nathan Nobbe
On Mon, Jan 10, 2011 at 2:55 PM, Steve Staples  wrote:

> On Mon, 2011-01-10 at 16:21 -0500, Paul M Foster wrote:
> > On Mon, Jan 10, 2011 at 12:02:51PM -0600, Donovan Brooke wrote:
> >
> > > Hello!, .. will try to keep this short!
> > > I've been a long time lurker but minimal poster. I made it a new years
> > > resolution to finally take on PHP jobs and now have my first one (with
> a
> > > completion date in a couple weeks!).
> > >
> > > I've been scripting in another language for many years and do know a
> > > thing or two.. but anticipate bothering the list a few times in the
> near
> > > future... hope that is fine with you all.
> > >
> > > I'm just about through Larry Ullman's "PHP" third edition that I
> started
> > > a couple days ago. Good book to start with I think, even for folks who
> > > have some kind of head start in Web Programming. I'm able to skim over
> > > a lot of it.
> > >
> > > I don't know how you all remain sane in dealing with quotes workarounds
> > > in echo/print statements, having to open/close PHP parsing using  > > ?> all the time, and having to deal with array's for just about
> > > everything... but I'm sure I'll get used to it and it will become
> second
> > > nature at some point. ;-)
> >
> > That stuff's easy. I'm still trying to wrap my wits around the crazy way
> > functions are handled in Javascript. I know of no other language which
> > treats functions the way Javascript does.
> >
> > Wait until you get to PHP's automatic casting of strings to numbers under
> > the proper conditions. You'll scratch your head for quite a while once
> > you hit that one.
> >
> > Paul
> >
> > --
> > Paul M. Foster
> > http://noferblatz.com
> >
> >
> or the ($needle, $haystack) vs ($haystack, $needle)... i still get it
> screwed up... thankfully php.net/{function_name} is easy to use :P


php --rf 

is also pretty handy.

-nathan