Re: formato de archivo
| From: | Roberto Cesar Najera | Date: | Wed, 19 Jan 2005 12:38:22 +0000 |
| Subject: | Re: formato de archivo | ||
| References: | 1 2 3 | Groups: | php.general.es |
| Request: | Send a blank email to general-es+get-53075@lists.php.net to get a copy of this message | ||
Mauri , eso es lo que necesitaba , de antemano gracias
Saludos !
----- Original Message -----
From: "Mauricio Rodriguez" <maurdz@gmail.com>
To: "Roberto Cesar Najera" <rob@dcaa.unam.mx>
Cc: <php-es@lists.php.net>
Sent: Wednesday, January 19, 2005 7:50 PM
Subject: Re: [PHP-ES] formato de archivo
> Hola Roberto, quiza te sirva esto lo saque del manual de php
>
> You may need to keep in mind the different newline characters
> (carriage return - CR, and linefeed - LF) employed by different OS's.
> Windows uses CRLF (\r\n), Macintosh uses CR (\r), and *nix systems
> generally use LF (\n). nl2br() seems to ONLY replace the \n
> character. If you're dealing with text that has been created on a Win
> or Mac box (such as input in an HTML textarea), you may have \r or
> \r\n termination on the lines. To replace these with the \n standard,
> you can use:
> $text= preg_replace("/\r\n|\r/", "\n", $text);
> - OR -
> $text= str_replace('\r\n', '\n', $text);
> $text= str_replace('\r', '\n', $text);
> (this solution may be faster than the regex)
>
>
>
>
> On Wed, 19 Jan 2005 12:39:55 +0100, Roberto Cesar Najera
> <rob@dcaa.unam.mx> wrote:
> > Hola lista
> >
> > tengo un problema con los formatos de archivos
> >
> > Creo un archivo de texto con saltos de linea y todo bien, el problema es
que
> > cuando el usuario lo baja a su maquina Windows, no lo puede ver como en
> > linux, como ago para converti estos carracteres \n a un salto de linea
en
> > formato dos de antemano
> >
> > gracias
> >
> > --
> > PHP Spanish Localization Talk Mailing List (http://www.php.net/)
> > To unsubscribe, visit: http://www.php.net/unsub.php
> >
> >