php-general Digest 11 Jan 2011 07:34:54 -0000 Issue 7126
Topics (messages 310627 through 310636):
Re: Validate Domain Name by Regular Express
310627 by: tedd
310628 by: Steve Staples
310629 by: tedd
310636 by: Gary
First PHP job
310630 by: Donovan Brooke
310631 by: tedd
310632 by: Paul M Foster
310633 by: Steve Staples
310634 by: Nathan Nobbe
310635 by: Paul M Foster
Administrivia:
To subscribe to the digest, e-mail:
[email protected]
To unsubscribe from the digest, e-mail:
[email protected]
To post to the list, e-mail:
[email protected]
----------------------------------------------------------------------
--- Begin Message ---
At 11:41 AM -0600 1/9/11, Donovan Brooke wrote:
Daniel Brown wrote:
On Sun, Jan 9, 2011 at 11:58, tedd<[email protected]> 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/
--- End Message ---
--- Begin Message ---
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<[email protected]> 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
--- End Message ---
--- Begin Message ---
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/
--- End Message ---
--- Begin Message ---
Donovan Brooke wrote:
> error in translation.
>
> I get the same domain for:
> seamonkey
> firefox
> googlechrome
> safari
>
> but yes, the actual square root character appears in safari only.
>
> Interesting!
"Although the Domain Name System supports non-ASCII characters,
applications such as e-mail and web browsers restrict the characters
which can be used as domain names for purposes such as a
hostname. Strictly speaking it is the network protocols these
applications use that have restrictions on the characters which can be
used in domain names, not the applications that have these limitations
or the DNS itself. To retain backwards compatibility with the installed
base the IETF IDNA Working Group decided that internationalized domain
names should be converted to a suitable ASCII-based form that could be
handled by web browsers and other user applications."
(http://en.wikipedia.org/wiki/Internationalized_domain_name#Internationalizing_Domain_Names_in_Applications)
--
Gary Please do NOT send me 'courtesy' replies off-list.
--- End Message ---
--- Begin Message ---
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 <?php
?> 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
--- End Message ---
--- Begin Message ---
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 <?php ?> 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 "<?php ?>" 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/
--- End Message ---
--- Begin Message ---
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 <?php
> ?> 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
--- End Message ---
--- Begin Message ---
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 <?php
> > ?> 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
--- End Message ---
--- Begin Message ---
On Mon, Jan 10, 2011 at 2:55 PM, Steve Staples <[email protected]> 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 <?php
> > > ?> 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 <function name>
is also pretty handy.
-nathan
--- End Message ---
--- Begin Message ---
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 <?php
> > > ?> 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
--- End Message ---