Jump to content
php.lv forumi

Dump konvertēšana uz UTF-8


hoho

Recommended Posts

Man ir tabulas dump windows-1257 kodējumā, vajag pārnest uz citu datu bāzi, utf-8 kodejumā. Kā var parkonvertēt tabulas dumpu uz utf-8? Rediģēt failu nevaru, pārāk liels apjoms, vajag kaut kā ar dump export/import.

Paldies.

Link to comment
Share on other sites

Es mēģinu sekojoši:

 

1. mainu kodējumu: iconv -f latin1 -t UTF-8 education.sql > education1.sql

2. mainu latin1 uz utf-8: sed -e 's/latin1/utf8/g' education.sql > education1.sql

3. importēju: mysql -u -p --default-character-set=utf8 dbname < education1.sql

 

bet diemžēl rezultātā vienalga ir problēma ir kodējumu, piem. Rīga ir Rîga.

 

Vai ir idejas kas ir nepareizi?

Link to comment
Share on other sites

Kad mēģinu pirmo komandu iconv -f latin1 -t UTF-8 education.sql > education1.sql

uz iconv -f CP1257 -t UTF-8 education.sql > education1.sql dabūju kļūdu:  iconv: illegal input sequence at position 2423

 

 

Importēju no konsoles : mysql -u -p --default-character-set=utf8 dbname < education1.sql

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...