contact form - chinese

Does anyone know of any problems likely to be encountered in a contact form where input fields may contain chinese characters?

I’m particularly thinking of the form handling script and the parsing of the form information. Form handler will probably be a PHP script.

thx


offtopic mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

You will want to make sure that the page html is in Unicode UTF-8,
and to extend the form tag with accept-charset="utf-8".

On the PHP side, you will want to be sure that multibyte support is
installed and also configured to be on. At the top of each page where
you will be processing this content, you want to add this bit:
mb_internal_encoding("utf-8");.

If you are then writing the form into MySQL, you want to make sure
that this query runs before any other queries in the page:

"SET CHARACTER SET utf8";

And your entire MySQL database should be set to the charset and
collation utf-8 general ci.

Yes, that’s a lot of belt-and-suspenders work, but in my experience,
it is all necessary.

Walter

On Jan 13, 2008, at 6:07 AM, hugh wrote:

Does anyone know of any problems likely to be encountered in a
contact form where input fields may contain chinese characters?

I’m particularly thinking of the form handling script and the
parsing of the form information. Form handler will probably be a
PHP script.

thx


offtopic mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options


offtopic mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

Walter, many thanks for the explanation and advice. Sorry not to get back to you earlier. regards Hugh


offtopic mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

I’m hitting all these problems all over again…!! due to re-design of the site a year on.

Walter, how do you make a page’s html UTF-8?? In Freeway (3.5) that is?

I’m also not sure what you mean by “At the top of each page where you will be processing this content”… errr, I’ve no idea where I’m processing this content! Where should I be processing it?

I have a text file of the chinese characters I need ( a translation of the address and legend for all the fields etc.) but when I paste these into Freeway and publish the form page the chinese just comes out as gobbledigook.

Hugh


offtopic mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

Click on the pasteboard and look at the inspector for the Encoding
picker. Set it to Unicode (you may have to click around in the tabs to
find this).

As to “where you are processing this” I mean whatever script you have
set as your form handler in the Form Setup dialog.

Walter

On Jan 21, 2009, at 9:06 AM, “hugh” email@hidden wrote:

I’m hitting all these problems all over again…!! due to re-design
of the site a year on.

Walter, how do you make a page’s html UTF-8?? In Freeway (3.5) that
is?

I’m also not sure what you mean by “At the top of each page where
you will be processing this content”… errr, I’ve no idea where
I’m processing this content! Where should I be processing it?

I have a text file of the chinese characters I need ( a translation
of the address and legend for all the fields etc.) but when I paste
these into Freeway and publish the form page the chinese just comes
out as gobbledigook.

Hugh


offtopic mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options


offtopic mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

Hi Walter,

It doesn’t have a Unicode option in the inspector ‘encoding’. It has a ‘none’ option…??


offtopic mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

Sorry, I don’t have 3.5 here any more, I could have sworn it did
Unicode. Sorry. Is there any way you can upgrade to 4 or 5?

Walter

On Jan 21, 2009, at 9:36 AM, hugh wrote:

Hi Walter,

It doesn’t have a Unicode option in the inspector ‘encoding’. It has
a ‘none’ option…??


offtopic mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options


offtopic mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

well, am considering doing just that as my new year pressie to myself :wink:

But not yet available. We did get the form working ok last year, although it was a bit of a prolem with encodings all round. I think I can solve the chinese text bit by making all the text gif text!

By the way, I added “mb_internal_encoding(“utf-8”);” to the top of the processing script, as you suggested, but on running the form it just spat out this:

Fatal error: Call to undefined function: mb_internal_encoding() in /web/sites/_c/_o/_n/company.co.uk/public/www/phpsite/dynaform2.php on line 3

??


offtopic mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

ps, Walter, on that issue of upgrading FW…

Are there any site transfer or performance issues you would be aware of if I were to go straight from 3.5 to 5? … (or do I have to go via 4?)

am on OSX 10.4.11, creaking along a bit on a dual 450 G4!


offtopic mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

That means that your server is not set up to use the Multibyte Script
extensions. Ask your host if they can enable that for you. Depending
on how your server was compiled, this may be as easy as a check-box in
a control panel form somewhere.

Walter

On Jan 21, 2009, at 10:27 AM, hugh wrote:

well, am considering doing just that as my new year pressie to
myself :wink:

But not yet available. We did get the form working ok last year,
although it was a bit of a prolem with encodings all round. I think
I can solve the chinese text bit by making all the text gif text!

By the way, I added “mb_internal_encoding(“utf-8”);” to the top of
the processing script, as you suggested, but on running the form it
just spat out this:

Fatal error: Call to undefined function: mb_internal_encoding() in /
web/sites/_c/_o/_n/company.co.uk/public/www/phpsite/dynaform2.php on
line 3

??


offtopic mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options


offtopic mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

There is a one-time issue with text box overflow that you will need to
deal with if any of your text boxes were close-set to their contents.
Freeway 3.5 used a completely different graphics engine than 4 and 5
do, and so the design view treats the bounds of text differently. This
can cause the text to “set long” and bump into the bottom of the box,
causing an overset. You will need to go through your pages, looking
for any text boxes with a in the bottom right corner, and drag
them out to a slightly larger size. Once you do this, you won’t have
the problem again. Until you fix it everywhere, you will see an alert
each time you try to publish.

Walter

On Jan 21, 2009, at 10:45 AM, hugh wrote:

ps, Walter, on that issue of upgrading FW…

Are there any site transfer or performance issues you would be aware
of if I were to go straight from 3.5 to 5? … (or do I have to go
via 4?)

am on OSX 10.4.11, creaking along a bit on a dual 450 G4!


offtopic mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options


offtopic mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options