Re: charset win1251

From: Date: Fri, 10 Aug 2001 07:53:20 +0000
Subject: Re: charset win1251
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-62128@lists.php.net to get a copy of this message
Hello BRACK, Thursday, August 09, 2001, 10:19:46 PM, you wrote: B> I finished English version of my site and wanted to start Russian B> part but realized that MySQL server returnes all data in koi-8r B> charset which is not very comfortable for some of the users, B> specially I know that A LOT of russians using Opera brawser older B> versions of which do not support koi-8 Any one knows how to B> convert koi-8 results of MySQL to win1251? It depends. What charset is your data in? If you DB's data is already in koi-8r, ther only thing you can do at the database level is to use a query: SET CHARACTER SET koi8_cp1251 and then execute your queries. All the data will be converted to win1251 codepage on the fly. Alternately, you can place all the data to the database in 1251 charset, and then compile mysqld with option --with-charset=cp1251 (used in ./configure) Then you'll have all the data returned in cp1251, and mysql will sort all the text data using that charset. To have the data returned in koi-8 in this case you'll have to issue a query SET CHARACTER SET cp1251_koi8 By the way, there's not so many russians, if any, using the old Opera browsers :) -- Best regards, Maxim Derkachev mailto:max.derkachev@books.ru System administrator & programmer, Symbol-Plus Publishing Ltd. phone: +7 (812) 324-53-53 www.books.ru, www.symbol.ru

« previous php.general (#62128) next »