List:General Discussion« Previous MessageNext Message »
From:Nils Valentin Date:May 5 2004 7:28am
Subject:Re: Documentation on character sets for version 4.0.17
View as plain text  
Hi David,

Thank you for the detailed description. That certainly makes things easier to 
argue now ;-).

O.K Where to start ?

First, as you know in version 4.0 you can basically set the character sets 
only for server and client side (not for DB, table, columns, connection and 
result sets).

You could set this from an application like Phpmyadmin I believe, BUT (note 
its a big but) if you are on a rental server, than I doubt that this will 
work, as you will also change other users character set.

So I guess for now you will have to stay right were you are.


- Using MySQL 4.1

Now lets assume 4.1 becomes stable today or tomorrow (just assuming, I have no 
info on this ;-)

In this case you would set the character set for the DB, table,columns etc. 
f.e from Phpmyadmin. You would input the query into the editor and ask 
Phpmyadmin to execute it.

I have not tried it, but that should work (if you have those privileges).

- Separating the characters for several cgi scripts

I am unable to help here really. I work mostly with a single cgi.
I can imagine that (assuming the cgi supports asian characters) it is just a 
matter of passing the right fields to the right cgi script.

I would not suggest mixed fields in a table. Its probably wiser to separate 
columns for asian texts and non-asian texts.


- About the search function with asian characters

This is a very hot issue. It wasnt discussed often yet here on the mailing 
list. As described on page 21 in my presentation, Regexp() does NOT yet work 
with asian characters. Please use "LIKE" for the moment. I am not even sure 
if "MATCH ... AGAINST" does work yet.

I believe the manual mentioned somewhere which commands are supposed to work 
with asian characters.


- To sum it all up

I hope that this answers the most important ones of your questions. With the 
cgi I am a bit unable to help really. If the cgi is known to work with 
Japanese characters then it should really just be a matter of separating the 
form fields for each cgi script.

However using 4.0.xx your main issue will be that you need to change the 
character set on a rental server sharing the same MySQL server with different 
users.

Best regards

Nils Valentin
Tokyo / Japan




On Wednesday 05 May 2004 04:05, David Jourard wrote:
> Nils,
>
> At 05:30 PM 5/4/04 +0100, you wrote:
> >Basically the best guess would be the documentation that comes with your
> >download. Note that online documents at www.mysql.com are always a mixture
> > of several documentation versions really.
>
> Thats the problem.  Yesterday, I downloaded 4.0.1x yet the documentation
> that comes with it in regards to asian character set etc. is 4.1
>
> But the application I'm working with is a perl/cgi/mysql thing on a virtual
> hosted site and is using 4.0.15 (which means I can only set things from the
> application level or via the connection string.)
>
> I need to know how to set this up for this version not 4.1
>
>  From your documentation I gather I need to tell the server what character
> set to use and also about data coming from and going to the client.
>
> My problem is I'm not too sure how to start.
>
> Here is the data flow:
>
> Storing Data
> ------------
>
> 1. web page (uses shift_sjis) -->
> 2. cgi app captures form data  with mixed fields eg. english and japanese
> 3. cgi app ---> saves data to mixed fields in a table.
>
> Is there something I do at the point data is being saved. Save one field in
> one kind of encoding and the other in another kind of coding.
>
> OR is there something I indicate by a property of the field
>
>
> Retrieving Data
> ---------------
> 1. cgi app searches on varchar fields both japanese and in english
> 2. cgi app searchs on text fields using fulltext engine for keyword
> searches.
>
>
> Everything works fine for the english but the searches in japanese are not
> working.
>
> I'm thinking maybe it has something to do with the encoding in the japanese
> fields which I'm not sure how to do at the field level for version 4.0.15
>
> Thanks
>
> David J.

-- 
kind regards

Nils Valentin
Tokyo/Japan

http://www.be-known-online.com/mysql/
Thread
Documentation on character sets for version 4.0.17David Jourard4 May
  • Re: Documentation on character sets for version 4.0.17Victoria Reznichenko4 May
    • Re: Documentation on character sets for version 4.0.17David Jourard4 May
      • Re: Documentation on character sets for version 4.0.17Nils Valentin4 May
Re: Documentation on character sets for version 4.0.17David Jourard4 May
  • Re: Documentation on character sets for version 4.0.17Nils Valentin5 May