> I found a solution!!!

Hooray!

> ***Replace all backlashes with two backslashes.***

You probably want to consider whether you want to replace all quotes
with backslash-quote, as well. Backslashes in the English text would
only show up for something like file paths on MS OSses, but your
customer might want to put single or double quotes around something on a
page, and the way it is right now MySQL should be throwing syntax errors
when it gets embedded quotes.

> (The hex value of the backslash is 0x5c, see Joel Rees' previous emails
> for an explanation on how multibyte Japanese characters contain the hex
> value 0x5c and that MySQL uses that value as an escape character.)
> 
> VBscript used prior to submitting data to database: 
> ~~~~~~~~~~~~~~~~~~~~~~~~
> 
>    szJapaneseText = replace(szJapaneseText, "\","\\")
> ~~~~~~~~~~~~~~~~~~~~~~~~

Sorry about talking first about regular expressions. I'm thinking VB
ought to have full RE by now, but maybe it's still only got the text
replacement function.

> Pulling from the database and displaying to a web page requires no
> additional processing. Simply display. 

You might want to turn off the post-processing for all non-English pages.
Even though the Chinese seems to work, I suspect there will be some
characters that you just haven't seen yet which get morphed by this
little trick. I think I'd warn the customer, though, and explain that it
will cost them extra to have it in foreign language pages.

Case munging is just one example of post-processing that only makes
sense in certain contexts. The time to _research_ which kinds of
post-processing make sense in which languages, ethnic groups, etc., is
not trivial. Could be worth doing if they have the money and the need.
But there aren't really any packaged solutions for those problems yet.

If they really think they want post-processing, you definitely want to
make sure the text is converted to Unicode by the time it hits
post-processing.

> Gerald Clark - It was your simple, brief message that made me think, "Is
> it that simple?" It is. 

:)

(Thanks, Gerald.)

-- 
Joel Rees <[EMAIL PROTECTED]>


---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to