Go Back   Armenian Knowledge Base > Technical sections > Webmaster Zone > Web Development

Reply
 
Thread Tools

MySQL -> KOI8 to Win 1251
Old 22.10.2002, 14:01   #1
Web developer
 
Aram Ghazanchyan's Avatar
 
Join Date: 09 2002
Location: Yerevan
Age: 43
Posts: 896
Rep Power: 0
Post MySQL -> KOI8 to Win 1251

U menya est' baza MySQL, gde vse recordy v formatte KOI-8, a mne nuzhno Win 1251. Kak mozhno avtomaticheski perekonvertirovat' DB?

Old 23.10.2002, 04:11   #2
Дошкольник
 
Dark Abyss of Yerevan's Avatar
 
Join Date: 01 2002
Location: hell
Posts: 124
Rep Power: 0
Post

В худшем случаем можно на перле или на php быстро написать конвертор, а потом поочередно конверитировать все записи .
php даже имеет встроенную функцию:
Code:
  
convert_cyr_string
(PHP3 >= 3.0.6, PHP4 )
convert_cyr_string -- 
     Convert from one Cyrillic character set to another
   
Description
string convert_cyr_string (string str, string from, string to)
This function converts the given string from one Cyrillic
     character set to another.  The from and
     to arguments are single characters that
     represent the source and target Cyrillic character sets.  The
     supported types are:
    
k - koi8-r
      
w - windows-1251
      
i - iso8859-5
      
a - x-cp866
      
d - x-cp866
      
m - x-mac-cyrillic
А если на перле, я тут покопался и нашел кое что:
http://cgi.dol.ru/cgilib.htm
Правда криво написано.

Old 23.10.2002, 13:14   #3
Web developer
 
Aram Ghazanchyan's Avatar
 
Join Date: 09 2002
Location: Yerevan
Age: 43
Posts: 896
Rep Power: 0
Post

Thanks a lot. Vsego 30 recordov legche budet snova zapisat'. No takoyu programmku napisat' stoit.
Reply




Реклама:
реклама

All times are GMT. The time now is 03:23.
Top

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.