What is JotForm?
JotForm is a free online form builder which helps you create online forms without writing a single line of code. No sign-up required.

At JotForm, we want to make sure that you’re getting the online form builder help that you need. Our friendly customer support team is available 24/7.

We believe that if one user has a question, there could be more users who may have the same question. This is why many of our support forum threads are public and available to be searched and viewed. If you’d like help immediately, feel free to search for a similar question, or submit your question or concern.


  • Profile Image

    French accents and other symbols not working with post data

    Asked by lasercorp on September 02, 2013 at 03:52 PM

    When I view the posted data (to insert into mysql) with answers that have an apostrophe or "#" or french accents,  I get the following.

     

    [veuillezselectionner] => L’imprimante a un # d’imprimante de LaserCorp 

    thanks for the help.

     

    Eric

    Page URL:
    http://www.jotformpro.com/form/32445715370957

    french POST post data style size height
  • Profile Image
    JotForm Support

    Answered by KadeJM on September 02, 2013 at 04:21 PM

    Hi Eric, That is a very interesting problem. I've taken a look at your form and everything seems configured correctly from what I can tell so far. I'm wondering if there's a problem that might possibly be misfiring this data in the actual script your using to send this but then it seems more like a Special Character issue.

    Would you mind if we take a look at the current script you have set up for this? And also do you mind if we test this some more from our end?

  • Profile Image

    Answered by lasercorp on September 02, 2013 at 09:40 PM

    Hi,

     

    I'm using the code that was posted in teh forum to print the data.

    http://pamppi.info/jotform-testing/thankyou/postvars.php

    It has always worked well.

     

    yes, please do what you need to to find the solution.

     

    Thank you

  • Profile Image
    JotForm Support

    Answered by EltonCris on September 03, 2013 at 12:14 AM

    @lasercorp

    You may encode the values instead to avoid that problem. Example:

    $answer = urlencode($_POST['veuillezselectionner']);

    echo $answer;

    Result:

    L%E2%80%99imprimante+n%C3%A9cessite+un+toner+et+une+r%C3%A9paration

    Then decode your data everytime you retrieved it from your database.

    eg. urldecode($_POST['veuillezselectionner']);

    Result:

    L’imprimante nécessite une réparation

    If you have further questions, let us know here. Thanks!

  • Profile Image

    Answered by lasercorp on September 03, 2013 at 10:57 PM

    Hi,

    The problem happens with apostophes which are part of the ASCII character-set. It is a big problem to encode and decode as the data ia being used in ms access database in numerous places.

    There must be an easier way especially since the character is part of the ASCII set.

    Thanks, 

  • Profile Image
    JotForm Support

    Answered by EltonCris on September 03, 2013 at 11:43 PM

    @lasercorp

    Yes, I found a simplier way. You just need to define utf-8 as charset of the page. You can use the following meta char set as highlighted in orange below.

    Example:

     

    <?php

    $answer = $_POST['veuillezselectionner'];

    $answer1 = $_POST['veuillezentrer'];

    ?>

    <html>

    <head>

    <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=UTF-8" />

    </head>

    <body>

    <?php

    echo $answer. "<br />";

    echo $answer1. "<br />";

    ?>

    </body>

    </html>

    You can test the first two radio button option on this form: http://jotformpro.com/form/32448869801969
    Hope this helps. Thanks!