List:General Discussion« Previous MessageNext Message »
From:Paul DuBois Date:November 13 2002 9:03pm
Subject:Re: Changing character sets and 'myisamchk -dvv'
View as plain text  
At 23:23 -0500 11/12/02, <stantz@stripped> wrote:
>         The MySQL documentation (4.6.1) says:
>
>>  You can change the character set with the --default-character-set option
>>  when you start the server.  The character sets available depend on the
>>  --with-charset=charset and --with-extra-charsets= list-of-charset | complex
>>  | all options to configure, and the character set configuration files listed
>>  in `SHAREDIR/charsets/Index'. See section 2.3.3 Typical configure Options.
>>
>>  If you change the character set when running MySQL (which may also 
>>change the
>>  sort order), you must run myisamchk -r -q on all tables.  Otherwise, your
>>  indexes may not be ordered correctly.
>
>         I have a MySQL server with databases that need to begin supporting
>japanese characters.  Per the advice cited above, I've shut it down, restarted
>it with '--with charset=sjis', and run 'myisamchk -r -q' on all tables.  All
>seems well enough.  But when I run 'myisamchk -dvv <tablename>', the
>'Character Set' line in the output indicates that the character set for tables
>created before I added '--with charset=sjis' to the safe_mysqld startup script
>is still 'latin1', whereas for newly created tables, myisamchk reports the
>character set is 'sjis'.  The fact that the output is different for tables
>created before and after the change was made suggests to me that I'm over-
>looking something.

When you run myisamchk -r -q, you should also add the --set-character-set=sjis
option so that myisamchk knows what character set to use.

Thread
Changing character sets and 'myisamchk -dvv'stantz13 Nov
  • Re: Changing character sets and 'myisamchk -dvv'Paul DuBois13 Nov
Re: Changing character sets and 'myisamchk -dvv'stantz14 Nov