• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

internationalizing trouble

New Here ,
Mar 26, 2007 Mar 26, 2007

Copy link to clipboard

Copied

hi,
following scenario:
client A fill html based form and submit it to cf page P for processing to database.
submitted form is html format and doesnt live at same server than cf, actualy it is in different country/different webserver.
for more, submitted form can have encoding set example:
<META http-equiv="Content-Type" content="text/html; charset=utf-8">

client B fill cf based form and submit it to cf page P for prosessing to database.
submitted form is cf format and live at same server than cf.
encoding is set to ISO-8859-1 and whole app is using ISO-8859-1 btw.. (dont ask why)

how i could handle client A?
i dont necessary know what encoding html form is using so i guess i have two different paths to choose:
1) chance server encoding and cf form for client B to utf-8
2) read somehow client A submitted html header and determine from that data used encoding and force cf to use it
to read/process form data

#1 is bigger job sence number of clients (and there webforms) using ISO-8859-1 is 98%
#2 could give me some breathing time, if succeeded, to do later #1

any thoughts or help?
Cheers
Kim
TOPICS
Advanced techniques

Views

349

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Mar 26, 2007 Mar 26, 2007

Copy link to clipboard

Copied

what ver of cf?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Mar 26, 2007 Mar 26, 2007

Copy link to clipboard

Copied

ver=cf 7 std

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Mar 26, 2007 Mar 26, 2007

Copy link to clipboard

Copied

LATEST
kim il sung wrote:
> <META http-equiv="Content-Type" content="text/html; charset=utf-8">

"just use unicode" (c). frankly, if you have one situation where you use
unicode, there will be others. might be better to just convert(if indeed the
latin-1 app is actually latin-1, see below).

> client B fill cf based form and submit it to cf page P for prosessing to
> database.
> submitted form is cf format and live at same server than cf.
> encoding is set to ISO-8859-1 and whole app is using ISO-8859-1 btw.. (dont
> ask why)

if you're 100% sure it's latin-1 & NOT windows-1252 you should be ok to use
utf-8 on the backend as latin-1 is a subset of unicode (i say this not knowing
anything about your app). also are you sure they are using latin-1 on the
backend? for cf7 you have to go out of your way to *not* use unicode.

> i dont necessary know what encoding html form is using so i guess i have two
> different paths to choose:

if they are actually setting the content type in the form's header i think you
might be able to simply examine CGI.CONTENT_TYPE but you won't be able to change
the processing page's encoding at run time, you'll need to redirect to a page
using whatever encoding you need. the tricky bit will be not to garbage the
form's data while you do the redirect. it might be simplest to point the
html/utf-8 form at a special page.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources
Documentation