Rowland,

We use a similar method -- uploading tab-delimited data and then calling a
MySQL LOAD DATA INFILE command.  For the fields you're exporting, you might
need to add backslashes to certain characters, such as apostrophe's or
quotation marks.  We do this with calculated fields so we're exporting only
calced fields that make the necessary changes.  Here's an example of one
such field (on FMP 6 -- probably different in 7 & 8):

Substitute(Substitute(Substitute(FieldNameHere,"&","&"),"""","""),"
\","\\")

That should give you an idea.  Check the MySQL documentation for what needs
to be escaped with a backslash.  Quotes may or may not be used when using
the LOAD DATA IN FILE command (I just don't remember) but as you can see
here we're changing them to HTML safe characters for our purposes.

Hopefully that helps.

Best,

Sean Saulsbury
Managing Partner
Box Office Mojo, LLC
www.boxofficemojo.com
[EMAIL PROTECTED]
(323) 376-5559

Copyright C 2006, Box Office Mojo, LLC.
All Rights Reserved.
 

-----Original Message-----
From: FileMaker Pro Discussions [mailto:[EMAIL PROTECTED] On
Behalf Of Rowland Carson
Sent: Sunday, November 26, 2006 5:56 AM
To: [email protected]
Subject: character sets query

I'm trying to find the right combination of character sets to ensure correct
display of accented, scandinavian, and other characters outside the plain
vanilla ASCII set, in both FMP and in a web browser view of a MySQL database
which is maintained by FMP text exports.

It looks like a UTF-8 text file provides the correct answer when it's
uploaded to MySQL and viewed with a browser. However, FMP (8.0v3 on Mac OS X
10.3.9) doesn't provide that among its text export options [Windows (ANSI),
ASCII (DOS), Macintosh, Unicode (UTF-16), Japanese (Shift-JIS)]. I've
achieved the desired result by opening the Mac option text file with
TextWrangler and re-saving it as UTF-8. 
However, that's a step I want to eliminate if possible, especially as this
will later need to work on Windows too.

If I try to use a MySQL LOAD DATA INFILE statement on an uploaded ANSI, DOS
or Mac format test file, it appears to discard any accented characters in a
field, and all subequent characters, until the next field marker (tab). The
UTF-16 option text file causes it to choke at the first character.

Any suggestions or pointers to references are welcome.

regards

Rowland
-- 
| Wilma & Rowland Carson    http://home.clara.net/rowil/
| <[EMAIL PROTECTED]>          ... that's Rowland with a 'w' ...

Reply via email to