andrisp Posted January 24, 2006 Report Share Posted January 24, 2006 Bija viena datubāzīte 4.0 serverī ar kodējumu cp1257, izeksportēju to text/sql failā vēl aizvien cp1257 kodējumā. Ir cits serveris (4.1), kur default character set ir utf-8. Tur izveidoju databāzi un uzstādīju charsetu uz cp1257. Ar šādu rindu: ALTER DATABASE `db` DEFAULT CHARACTER SET 'cp1257'; Pēc tam mēģinu importēt iepriekš exportēto text/sql failu, bet visi latviešu simboli pārkonvertējās par utf-8. Kur ir problēma ? Link to comment Share on other sites More sharing options...
Roze Posted January 24, 2006 Report Share Posted January 24, 2006 Caur ko taisi importu? Ja caur 'mysql' pamēģini pielikt mysql --default-character-set=cp1257 ... < tavs.sql Link to comment Share on other sites More sharing options...
andrisp Posted January 24, 2006 Author Report Share Posted January 24, 2006 caur phpmyadmin, tur pat noraadiiju, ka source fails ir cp1257.. pameegjinaashu no mysql tuulja Link to comment Share on other sites More sharing options...
[Ya] Posted January 24, 2006 Report Share Posted January 24, 2006 a tad kad tu skaties phpmyadminā tev skata charsets ir utf8 vai cp1257? Link to comment Share on other sites More sharing options...
andrisp Posted January 24, 2006 Author Report Share Posted January 24, 2006 Browserim uzsleedzu cp1257, bet vispaar shis (phpmyadmin) saka utf-8, bet cp1257, tur nemaz nevar izveeleeties.. Pameegjinaaju izdzeest visu datubaazi aaraa, peec tam izveidot jaunu ar komandu CREATE DATABASE `db` DEFAUL CHARACTER SET cp1257 - viss ok. Tālāk caur to pashu phpmyadmin pameegjinaaju to sql kodu izpildiit (neizmantojot import, bet caur browsera textarea), browserism uzsleedzu cp1257. Rezultaataa visi lv simboli tiek paarveersi par ? un pat vairs par utf-8 ne .. Link to comment Share on other sites More sharing options...
Grey_Wolf Posted January 24, 2006 Report Share Posted January 24, 2006 Ja tabulas nav daudz tad palabo pashu dump failu.. pieliec tabulas izveidei DEFAULT CHARSET=.... ------- CREATE TABLE `aaaaaaaaaaa` ( `a` char(3) NOT NULL default '', `b` varchar(5) NOT NULL default '' ) ENGINE=MyISAM DEFAULT CHARSET=cp1257; -------- Link to comment Share on other sites More sharing options...
andrisp Posted January 24, 2006 Author Report Share Posted January 24, 2006 CREATE TABLE `asdasd` ( `ts` TEXT NOT NULL ) TYPE = MYISAM CHARACTER SET cp1257 COLLATE cp1257_general_ci; Un vienalga nevar ieglabaat latvieshu simbolus ! :((( Link to comment Share on other sites More sharing options...
[Ya] Posted January 24, 2006 Report Share Posted January 24, 2006 nestāsti ka tur nevar izvēlēties cp1257 Link to comment Share on other sites More sharing options...
andrisp Posted January 24, 2006 Author Report Share Posted January 24, 2006 nu es laikam sajaucu ar "Language:", kur var izveeleeties tikai starp utf, tu laikam domaaji "MySQL connection collation:", izveeleejos cp1257, bet taapat visi latvieshu simboli paartop par "?" Link to comment Share on other sites More sharing options...
Recommended Posts