navigation  interaction  search

 other resources

Changeset 432

Show
Ignore:
Timestamp:
08/15/08 13:44:27
Author:
nate
Message:
  • Added support for escaping quotes in import csv files with a backslash (\) character.
Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/phpbms/include/parsecsv.lib.php

    r427 r432  
    360360                $strlen = strlen($data); 
    361361                 
     362                // --nrieb-- Adding support for escaping quotes with a backslash (\) character 
     363                $data = str_replace('\"', '""', $data); 
     364                 
    362365                // walk through each character 
    363366                for ( $i=0; $i < $strlen; $i++ ) { 
  • trunk/phpbms/modules/base/general_import.php

    r431 r432  
    183183                                                Delimeters are commas (,) and enclosures are double-quotes (").  If you 
    184184                                                wish to escape a double-quote character inside of an enclosure, add another 
    185                                                 double-quote character (e.g ...,"Benny ""The Jet"" Rodriguez",...). 
     185                                                double-quote character (e.g ...,"Benny ""The Jet"" Rodriguez",...), or with 
     186                                                a backslash character (\) (e.g ...,"Benny \"The Jet\" Rodriguez",...). 
    186187                                        </p> 
    187188                                        <p> 
  • trunk/phpbms/modules/base/users_import.php

    r431 r432  
    182182                                                Delimeters are commas (,) and enclosures are double-quotes (").  If you 
    183183                                                wish to escape a double-quote character inside of an enclosure, add another 
    184                                                 double-quote character (e.g ...,"Benny ""The Jet"" Rodriguez",...). 
     184                                                double-quote character (e.g ...,"Benny ""The Jet"" Rodriguez",...), or with 
     185                                                a backslash character (\) (e.g ...,"Benny \"The Jet\" Rodriguez",...). 
    185186                                        </p> 
    186187                                        <p> 
  • trunk/phpbms/modules/bms/clients_import.php

    r431 r432  
    201201                                                Delimeters are commas (,) and enclosures are double-quotes (").  If you 
    202202                                                wish to escape a double-quote character inside of an enclosure, add another 
    203                                                 double-quote character (e.g ...,"Benny ""The Jet"" Rodriguez",...). 
     203                                                double-quote character (e.g ...,"Benny ""The Jet"" Rodriguez",...), or with 
     204                                                a backslash character (\) (e.g ...,"Benny \"The Jet\" Rodriguez",...). 
    204205                                        </p> 
    205206                                        <p> 
  • trunk/phpbms/modules/bms/products_import.php

    r431 r432  
    183183                                                Delimeters are commas (,) and enclosures are double-quotes (").  If you 
    184184                                                wish to escape a double-quote character inside of an enclosure, add another 
    185                                                 double-quote character (e.g ...,"Benny ""The Jet"" Rodriguez",...). 
     185                                                double-quote character (e.g ...,"Benny ""The Jet"" Rodriguez",...), or with 
     186                                                a backslash character (\) (e.g ...,"Benny \"The Jet\" Rodriguez",...). 
    186187                                        </p> 
    187188                                        <p> 
Copyright © 2006-2007 Kreotek, LLC. All Rights reserved.