Results 1 to 8 of 8
  1. #1
    Full Member
    Join Date
    January 18th, 2005
    Posts
    362
    How do you handle line breaks so descriptions don't come out as one big blob of text?

    I've only checked a few feeds but so far only one of them had BR html tags as line breaks.

    Is there something I'm missing?

  2. #2
    Newbie
    Join Date
    January 18th, 2005
    Posts
    4
    If you are working with PHP you can convert line breaks to <br> tags with $descriptionstring=nl2br($descriptionstring).

  3. #3
    Newbie
    Join Date
    January 18th, 2005
    Posts
    46
    Or in Perl...

    $var =~ s/\n/\<BR\>/sig;



    Cheers

  4. #4
    Full Member
    Join Date
    January 18th, 2005
    Posts
    362
    are the line breaks visible in the feed through notepad? I don't see any \r's or \n's anywhere.

    I'm currently using LOAD DATA INFILE with line break \r\n and I'm not getting any BR tags in my description fields.. or is it supposed to stay as \n and then I convert it when retrieving?

    I've not seen one line break such as \n in the feeds but I'm thinking maybe that's something that doesn't show up in normal text editors?

  5. #5
    Newbie
    Join Date
    January 18th, 2005
    Posts
    46
    Hi. The whole point in \n is for either a data seperator, or to format something, without actually putting it on a new line. For example;

    my $var = '\n\n\n';
    print $var . "\n";
    $var =~ s/\n/\<BR\>/g;
    print $var . "\n";

    This would print out 3 lines, and then once these newlines are replace, it would print out 3 <BR> tags. Not sure if that answers your question though, or is just a load of blabber

    Cheers

  6. #6
    Full Member
    Join Date
    January 18th, 2005
    Posts
    362
    are these breaks visible in the datafeed as \n?

    currently the few I've worked with don't have \n in the feeds... and as such I get a blob of text for a description.

  7. #7
    Newbie
    Join Date
    January 18th, 2005
    Posts
    46
    Hi. They won't be physically visable. The only way you know they are there, is because the data goes onto another line, processed. Hope that helps

    Cheers

  8. #8
    ABW Ambassador
    Join Date
    January 18th, 2005
    Posts
    532
    I'm putting together a custom datafeed for a small selection of my own products in MS Excel to export for use with WebMerge. However the issue I am running into is that when exporting as a CSV or TXT file some of my descriptions are being converted to strings of pound signs "#"! I know MS Excel is supposed to have an in cell character limit of 255(?) but some of these descriptions are shorter than that and yet don't seem to be exporting correctly. Is there a way to 'force' Excel to export the data correctly? Is there some sort of in cell character limit when exporting that I am not aware of...if so what is the maximum number of characters that can be exported as CSV or TXT per cell?

    I temporarily 'fixed' the issue by truncating the descriptions to 150 characters in another field and then using that field in WebMerge but I'm losing more than I would like of my descriptions...

  9. Newsletter Signup

+ Reply to Thread

Similar Threads

  1. Can't Put Fields In Html Title, Keyword, and Description?
    By tfftff in forum WebMerge (Fourthworld.com)
    Replies: 8
    Last Post: September 16th, 2007, 09:01 AM
  2. Replies: 1
    Last Post: February 9th, 2005, 12:49 PM
  3. Fields.com
    By marito in forum Rakuten LinkShare - LS
    Replies: 8
    Last Post: January 11th, 2004, 06:45 AM
  4. Fields and Target
    By Aunt Lily in forum Rakuten LinkShare - LS
    Replies: 20
    Last Post: October 26th, 2003, 09:02 AM
  5. Mrs Fields Down
    By josephmonuit in forum Rakuten LinkShare - LS
    Replies: 1
    Last Post: April 16th, 2003, 10:20 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •