Rodan Posted February 25, 2005 Report Share Posted February 25, 2005 Kā var organizēt subj. bez iconv? Link to comment Share on other sites More sharing options...
bubu Posted February 25, 2005 Report Share Posted February 25, 2005 A kas slikts iconv()? Tas tak speciāli šādam mērķim paredzēts. Link to comment Share on other sites More sharing options...
Rodan Posted February 25, 2005 Author Report Share Posted February 25, 2005 A kas slikts iconv()? Tas tak speciāli šādam mērķim paredzēts. 14230[/snapback] iconv() nav pieejams serverā. Link to comment Share on other sites More sharing options...
Venom Posted February 25, 2005 Report Share Posted February 25, 2005 tika aprakstīts variants ar kaučvai MySQL-Front+SciTe Link to comment Share on other sites More sharing options...
Rodan Posted February 25, 2005 Author Report Share Posted February 25, 2005 tika aprakstīts variants ar kaučvai MySQL-Front+SciTe 14232[/snapback] :blink: gribētos dinamiski ar php. Link to comment Share on other sites More sharing options...
Venom Posted February 25, 2005 Report Share Posted February 25, 2005 Tad es rīkotos kaut kā tā: SHOW TABLES FROM [database] foreach(Tables_in_[database] as [table]) { SHOW FIELDS FROM epus_billing //noskaidrojam lauku nosaukumus, kuri ir primary SELECT * FROM [table] vienā connectā while(fetch_array) { UPDATE [table] SET foreach (Field) $value=iconv[$value] WHERE tādi un tādi primary keys - citā konektā } } Link to comment Share on other sites More sharing options...
Rodan Posted February 25, 2005 Author Report Share Posted February 25, 2005 Tad es rīkotos kaut kā tā: SHOW TABLES FROM [database] foreach(Tables_in_[database] as [table]) { SHOW FIELDS FROM epus_billing //noskaidrojam lauku nosaukumus, kuri ir primary SELECT * FROM [table] vienā connectā while(fetch_array) { UPDATE [table] SET foreach (Field) $value=iconv[$value] WHERE tādi un tādi primary keys - citā konektā } } 14238[/snapback] Vai mēs runājam par vienu lietu? Man nekas nav vajadzīgs rediģēt datu bazē. Un es nevaru izmantot iconv(). Man ir vajadzīgs algoritms vai funkcija, kas stradā tapat, ka iconv('UTF-8','windows-1257',$myString). Link to comment Share on other sites More sharing options...
рпр Posted February 25, 2005 Report Share Posted February 25, 2005 nu ja nepatiik iconv, tad pats taisi savu funkciju, kas paarveidos tev tos datus ar str_replace Link to comment Share on other sites More sharing options...
Venom Posted February 25, 2005 Report Share Posted February 25, 2005 turpinot рпр domu: sastādi masīvu $ary=array('Ā burts UTF-8 kodējuma'=>'Ā',...); un izmanto str_replace(array_keys($ary),$array_values($ary),$string); tikai atgādināšu, ka iekš tā UTF-8 var būt arī citas valodas nekā latviešu Link to comment Share on other sites More sharing options...
bubu Posted February 25, 2005 Report Share Posted February 25, 2005 Nu vēl jau variants, ja pieejams mysql 4.1 versija (vismaz, nezinu vai iepriekšējās to uztur), tad tai var padot stringus vienā formātā, bet teikt, lai ieraksta citā. Piemēram: http://dev.mysql.com/doc/mysql/en/charset-convert.html Link to comment Share on other sites More sharing options...
hmnc Posted February 25, 2005 Report Share Posted February 25, 2005 bija vajadzība no windows-1257 uz UTF-8 bez iconv. nu neko - rakstam funkciju ar str_replace un miers. nekāda čakara. vienīgi jāsaraksta visi simboli. Link to comment Share on other sites More sharing options...
Recommended Posts