Japanese text, cgi, sql (again)

Kay C Lan lan.kc.macmail at gmail.com
Thu Jun 4 06:32:42 EDT 2009


On Thu, Jun 4, 2009 at 2:35 PM, Nicolas Cueto <niconiko at gmail.com> wrote:

>
> On and off over the last three years, I've
> been trying to crack the problem of
> downloading Japanese text which is
> contained in a mysql database by
> a stack + rev.cgi combination.
>
> It's that time of year again.
>
> As with past attempts, my latest too
> works fine except for the same old
> problem --  Japanese text arrives
> in the stack garbled (English text
> is ok).
>
> How do you know where the text becomes garbled?

Have you tried with a 'local' mySQL database?

When you send Japanese Text from Rev to mySQL and view it with a 3rd party
app like Navicat, does it appear in Navicat as you would expect it to? ie
has it arrived in the db correctly?

If you use Navicat to:

SELECT japaneseTextColumn FROM myTable INTO OUTFILE
'HD/Users/Shared/textDump.txt'

does it come out as you expect?

If you use Rev's revExecuteSQL command to do the statement above does the
file come out exactly the same? (note you will have to use a different file
name as mySQL will not overwrite an existing file)

If you use Rev's revDataFromQuery command and place the result in a variable
and look at it in the Variable Watcher is it what you expect?

Does it all fall apart at the very last step, placing the variable into a
html document where it is no longer displayed correctly?

You say it arrive's in the Rev stack garbled, but you mention html char set,
is this in a revBrowser window or do you mean a html document which then
displays in Firefox incorrectly?

Sorry, not much help.



More information about the use-livecode mailing list