Viewing 10 replies - 1 through 10 (of 10 total)
  • Hi,

    Try:
    $dog->description = str_replace("â", "'", $dog->description);

    on line 353 right after

    switch ($dog->size){
    case "L":
    $size = "Large";
    break;
    case "M":
    $size = "Medium";
    break;
    case "S":
    $size = "Small";
    break;
    default:
    $size = "Not known";
    break;
    }
    Thread Starter greginky

    (@greginky)

    2 questions:
    #1 header.php file?
    #2 How can I get the line numbers to show?

    #1:
    petfinder-listings.php

    #2:
    Depends on what editor you are using. I can’t really answer that question. Look for the pattern I referenced, it should be near the bottom.

    Thread Starter greginky

    (@greginky)

    That did not do it unfortunately. I found the right place to put it. I am only using notepad as an editor

    Thread Starter greginky

    (@greginky)

    Well since I can’t find the answer to this then I will just have to do the next best thing, change my PetFinder listing and remove all instances of the apostrophe.I think I have read on one of these forums or threads that PetFinder strips the html from their listings. I don’t know if maybe this can be fixed by looking into the PetFinder side of things. I really don’t want to have to change the wording but it is better than having the char set problem.

    Sorry, I have been really busy with work.

    Please hold off on doing that, it seems like a lot of unnecessary work. I may have a solution in a few mins.

    Put the following at the end of the <script> tags of the code I gave you earlier for the widget trim (header.php). Make sure you do not accidentally place it within the other document.ready, or you will probably break both scripts.

    $(document).ready(function () {
        var desc = $('.description').contents()
    
        for (var i = 0; i < desc.length; i++) {
    
            desc[i].textContent = desc[i].textContent.replace(/â/g, '\'');
    
        }
    });
    Thread Starter greginky

    (@greginky)

    Hey, no need to apologize. I am extremely grateful for all that you have done for me. Unfortunately I put this in and it still doesn’t work. I went back and double checked to make sure that I followed your instructions to the letter, but still no dice. I am assuming that by the end of the scripts as after the </script> tag.

    Hi, it seems that you did not put my code within the <script> section.

    Currently it is…
    <script src…></script>
    NEW CODE
    <script></script>

    It should be
    <script>NEW CODE</script>

    Make sure that the new code is contained within a <script> tag, preferably not the <script src> one.

    Thread Starter greginky

    (@greginky)

    Great, thank you so much. wrapping the code in in the script tags did the trick.

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘Char Set Issue’ is closed to new replies.