Skip to main content
Participant
August 18, 2009
Question

Problem to get Accented French Characters coming from a form

  • August 18, 2009
  • 2 replies
  • 3139 views

I have an ASP form which submits the data to a ColdFusion form. Once text fields include French Accented letters (e.g.: é), those will be shown as little squares (�) in ColdFusion output. I use ‘URLdecode’ function, but it doesn’t resolve the issue.

I tested this with submitting to an ASP page, no problem to get correct accented letters.

Any help to resolve this issue is very much appreciated.

Thanks.

Sarath

    This topic has been closed for replies.

    2 replies

    Inspiring
    August 20, 2009

    To correctly handle international character-sets, focus on two things:

    1. The character encoding must be properly declared.  This tells everyone concerned exactly how the character-stream maps to the underlying byte-stream that is being transmitted.  If the browser and/or the server do not know and agree upon this, the sender might fail to encode the intended character-stream correctly, and/or the recipient might fail to decode the byte stream that it receives.  Either way, "what you meant to send is not what he got."  Either or both parties can be the culprit.
    2. The font must be one that actually supports all of the characters named.  Some fonts do; some fonts don't.  A generic font-specification is usually better than an explicit by-name reference, to be sure that a suitable font can be selected.

    Also... put your HTML and CSS information through a "lint" tool.  If browsers get a stream that they are not totally-satisfied with, they try to "recover," and they might not say anything at all but things just don't come out right.  Naturally, this varies by browser.

    Participant
    August 21, 2009

    Thanks everybody for valuable suggestions.

    I got another problem once I changed Charset to 'UTF-8' from 'iso-8859-1'.

    There is drop-down in ASP form in which data coming from a database table. Now, accented French letters in that dropdown are changed to strange Chinese like character, for instance 'Béthanie' shows up as 'B鴨anie'.

    Collation of this SQL 2000 database is 'SQL_Latin1_General_CP1_CS_AI'.

    Any suggestions to resolve this issue would be very much appreciated.

    Thanks.

    Sarath

    Inspiring
    August 21, 2009

    if this is the ASP side, then it's not using unicode.

    lets back track, what's the db datatype for this text? an "N" (nvarchar, etc.)? if it's not, then you'll either need to change the whole db to use "N" datatypes as well as change the ASP app to use unicode (i have no idea how). since i guess this would be too much, you'll need to change the cf side to use latin-1 (iso-8859-1) via the cfprocessingDirective tag & the setEncoding() function. but before you do that you need to find out what the ASP app's encoding is. very often windows apps use windows-1252 codepage which is a SUPER set of latin-1. get  the encodings right or you'll end up w/more voodoo problems down the line.

    Inspiring
    August 18, 2009

    what's the ASP page's encoding? how are you sending the ASP form vars to cf?

    POST or GET?

    Participant
    August 18, 2009

    Thanks for the reply.

    No 'encoding', here is the 'Form' tag '<form name=form1 action="AddSendEmail.cfm" method=post>', method is 'Post'.

    Since we don't have ASP email facility in our servers, this form is submitted to CFM page send an email.

    Sarath

    Inspiring
    August 18, 2009

    it always has an encoding (i guess you might call it "charset"). if it's not an

    explicit hint, what's the default for ASP?