WordPress.org

Ready to get started?Download WordPress

Forums

WP Ultimate CSV Importer Plugin
[resolved] How to handle commas and " ' " (4 posts)

  1. cenny
    Member
    Posted 1 year ago #

    Hi Love the plugin, but each time I use a ' it stopped printing out the text, i.e. when I use It's or don't or wouldn't after the ' there is no text anymore.

    Can I escape "," or "'" them? and how? I'm searching for a solution but don't find one. I use the ; delimeter.

    Hope somebody can help me out, thanks a lot!!

    http://wordpress.org/extend/plugins/wp-ultimate-csv-importer/

  2. smackcoders
    Member
    Plugin Author

    Posted 1 year ago #

    Yes, you should properly escape , with quotes. Instead use a csv editor like MS Excel or Open office Spreadsheet to format the csv and save.

    Hope this helps.

  3. cenny
    Member
    Posted 1 year ago #

    Hi, thnx for your respons, but how do I properly escape a comma or '

    Thanks

  4. smackcoders
    Member
    Plugin Author

    Posted 1 year ago #

    You can refer http://en.wikipedia.org/wiki/Comma-separated_values

    Here is the Basic rules and examples

    1997,Ford,E350

    Any field may be quoted (that is, enclosed within double-quote characters). Some fields must be quoted, as specified in following rules.

    "1997","Ford","E350"

    Fields with embedded commas must be quoted.

    1997,Ford,E350,"Super, luxurious truck"

    Each of the embedded double-quote characters must be represented by a pair of double-quote characters.

    1997,Ford,E350,"Super, ""luxurious"" truck"

    Fields with embedded line breaks must be quoted (however, many CSV implementations simply do not support this).

    1997,Ford,E350,"Go get one now
    they are going fast"

    In some CSV implementations, leading and trailing spaces and tabs are trimmed. This practice is controversial, and does not accord with RFC 4180, which states "Spaces are considered part of a field and should not be ignored.".

    1997, Ford, E350
    not same as
    1997,Ford,E350

    However, the RFC didn't say what to do when white spaces appear outside the quoted value.

    1997, "Ford" ,E350

    In CSV implementations that do trim leading or trailing spaces, fields with such spaces as meaningful data must be quoted.

    1997,Ford,E350," Super luxurious truck "

    The first record may be a "header", which contains column names in each of the fields (there is no reliable way to tell whether a file does this or not; however, it is uncommon to use characters other than letters, digits, and underscores in such column names).

    Year,Make,Model
    1997,Ford,E350
    2000,Mercury,Cougar

    You can also google for more detailed help

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic