php-general Digest 9 Nov 2008 00:58:01 -0000 Issue 5780

Topics (messages 283094 through 283101):

Re: Printing Web Page
        283094 by: Patrick Moloney
        283095 by: Ashley Sheridan

strtotime
        283096 by: gilles
        283097 by: Maciek Sokolewicz
        283098 by: Bastien Koert
        283101 by: Micah Gersten

Re: PCRE regex result is different between Linux & Windows.
        283099 by: ClapClap

htmlentities() and default_charset
        283100 by: Jim Hermann - UUN Hostmaster

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 ---
Ashley Sheridan wrote:
On Thu, 2008-11-06 at 22:35 +0100, Frank Arensmeier wrote:
6 nov 2008 kl. 21.21 skrev Patrick Moloney:

I'd like to enable my users to print individual web pages from their browser. If they simply select the browser print button they don't get all the text that is displayed in a scrolling text area.
The web page is static html and css, in a php file.

This might be a good starting point.

http://www.alistapart.com/articles/printyourway

//frank


<link href="print.css" media="print" type="text/css" rel="stylesheet"/>

Then set out your CSS in print.css to lay out the page without scrolling
areas.


Ash
www.ashleysheridan.co.uk


Thanks all! So, to state the obvious (to you all) the solution is to address my original question through CSS. That sounds good. Ashly, your post is helpful. What is the next step, to display the page on screen using the new stylesheet, then rely on the user to use the browsers print button?

Thanks,
Patrick


--- End Message ---
--- Begin Message ---
On Sat, 2008-11-08 at 08:01 -0500, Patrick Moloney wrote:
> Ashley Sheridan wrote:
> > On Thu, 2008-11-06 at 22:35 +0100, Frank Arensmeier wrote:
> >> 6 nov 2008 kl. 21.21 skrev Patrick Moloney:
> >>
> >>> I'd like to enable my users to print individual web pages from their  
> >>> browser. If they simply select the browser print button they don't  
> >>> get all the text that is displayed in a scrolling text area.
> >>> The web page is static html and css, in a php file.
> >>>
> >> This might be a good starting point.
> >>
> >> http://www.alistapart.com/articles/printyourway
> >>
> >> //frank
> >>
> >>
> > <link href="print.css" media="print" type="text/css" rel="stylesheet"/>
> > 
> > Then set out your CSS in print.css to lay out the page without scrolling
> > areas.
> > 
> > 
> > Ash
> > www.ashleysheridan.co.uk
> > 
> 
> Thanks all! So, to state the obvious (to you all) the solution is to 
> address my original question through CSS. That sounds good.
> Ashly, your post is helpful. What is the next step, to display the page 
> on screen using the new stylesheet, then rely on the user to use the 
> browsers print button?
> 
> Thanks,
> Patrick
> 
> 
Easier than that even, the browser automatically selects this stylesheet
when the user presses the print button (or you issue a window.print()
from javascript) because it recognises the media="print" attribute. You
can use the media type for other browsers too, like audio, print,
screen, projectors, etc.


Ash
www.ashleysheridan.co.uk


--- End Message ---
--- Begin Message ---
Avec la version 4 de php, strtotime("20080950") fonctionne correctement en 
allant sur le mois d'octobre, alors qu'en version 5: 19700101.
Merci de votre aide 



--- End Message ---
--- Begin Message ---
gilles wrote:
Avec la version 4 de php, strtotime("20080950") fonctionne correctement en allant sur le mois d'octobre, alors qu'en version 5: 19700101. Merci de votre aide


This is an ENGLISH list, please rephrase your question in english and people might understand.

Cette liste est une liste anglaise, reformulent svp votre question en anglais svp.

merci,

- Tul

--- End Message ---
--- Begin Message ---
2008/11/8 Maciek Sokolewicz <[EMAIL PROTECTED]>

> gilles wrote:
>
>> Avec la version 4 de php, strtotime("20080950") fonctionne correctement en
>> allant sur le mois d'octobre, alors qu'en version 5: 19700101.
>> Merci de votre aide
>>
>>
> This is an ENGLISH list, please rephrase your question in english and
> people might understand.
>
> Cette liste est une liste anglaise, reformulent svp votre question en
> anglais svp.
>
> merci,
>
> - Tul
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
I'll translate

In PHP4, strtotime works fine

in PHP5 strtotime gives a result of 19700101 when the data entered was
strtotime("20080950")

-- 

Bastien

Cat, the other other white meat

--- End Message ---
--- Begin Message ---
Bastien Koert wrote:
> 2008/11/8 Maciek Sokolewicz <[EMAIL PROTECTED]>
>
>   
>> gilles wrote:
>>
>>     
>>> Avec la version 4 de php, strtotime("20080950") fonctionne correctement en
>>> allant sur le mois d'octobre, alors qu'en version 5: 19700101.
>>> Merci de votre aide
>>>
>>>
>>>       
>> This is an ENGLISH list, please rephrase your question in english and
>> people might understand.
>>
>> Cette liste est une liste anglaise, reformulent svp votre question en
>> anglais svp.
>>
>> merci,
>>
>> - Tul
>>
>>
>> --
>> PHP General Mailing List (http://www.php.net/)
>> To unsubscribe, visit: http://www.php.net/unsub.php
>>
>>
>>     
> I'll translate
>
> In PHP4, strtotime works fine
>
> in PHP5 strtotime gives a result of 19700101 when the data entered was
> strtotime("20080950")
>
>   
What does "work fine" mean?  "20080950" isn't normal, so what is the
expected result?

Thank you,
Micah Gersten
onShore Networks
Internal Developer
http://www.onshore.com



--- End Message ---
--- Begin Message ---
Lupus Michaelis a écrit :
ClapClap a écrit :

For the PCRE version, I really can not tell you which one I use...
Where can I see that ?

  In the the output from phpinfo function.


Thanks.
My versions of PCRE :
- Linux 7.4 2007-09-21 (PHP 5.2.4-2ubuntu5.3)
- Windows XP 7.2 2007-06-19 (PHP 5.2.4)

So, It may be a bug ? Too bad...

I remember some change behavior recently in PCRE. But I am not sure, I want just to drop this option first.


Yeah !
It's probably that. I hope...
Too bad.

--
Julien


--- End Message ---
--- Begin Message ---
Folks,

Why should htmlentities() use the default_charset for $charset with this
example, taken from ext/standard/tests/strings/htmlentities10.phpt?

<?php
        ini_set('mbstring.internal_encoding','pass');
        ini_set('default_charset','cp1252');
        var_dump(htmlentities("\x82\x86\x99\x9f", ENT_QUOTES, ''));
?>

The test script expects the output to be:
string(28) "&sbquo;&dagger;&trade;&Yuml;"

According to the PHP Manual, the htmlentities() syntax is:

string htmlentities  ( string $string  [, int $quote_style  [, string
$charset  [, bool $double_encode  ]]] )

For the parameter charset:

"Like htmlspecialchars(), it takes an optional third argument charset which
defines character set used in conversion. Presently, the ISO-8859-1
character set is used as the default."  It goes on to list the supported
values for charset and states:  "Note:  Any other character sets are not
recognized and ISO-8859-1 will be used instead."

Therefore, when $charset = '' I would expect that
htmlentities("\x82\x86\x99\x9f", ENT_QUOTES, '') would use ISO-8859-1 since
the null string is not listed as a supported value.  Also, it does not
mention the use of default_charset.  Furthermore, when default_charset = '',
PHP states that ISO-8859-1 will be used as the default.

Since the $charset is optional, I would expect
htmlentities("\x82\x86\x99\x9f", ENT_QUOTES) would use the default_charset,
but not htmlentities("\x82\x86\x99\x9f", ENT_QUOTES, '').  However, test
scripts ext/standard/tests/strings/htmlentities10.phpt, htmlentities11.phpt,
and htmlentities13.phpt all expect the default_charset to be used when
charset=''.

Thanks.

Jim
-----
Jim Hermann <[EMAIL PROTECTED]>
UUism Networks <http://www.UUism.net>
Ministering to the Needs of Online UUs
Web Hosting, Email Services, Mailing Lists
-----


--- End Message ---

Reply via email to