How to convert data from KOI-8 to UTF-8

Author Message

Vytautas Germanavičius

Tuesday 19 October 2004 4:29:29 am

I made site with EZ 3.3.3. Site is in russian. Instaler set encoding to KOI-8. So all data in site are entered using that encoding.
Now i would like to add data in lithuanian (encoding iso8859-13 or UTF-8).
But how to convert all data from old database to new?

{set-block scope=root variable=cache_ttl}0{/set-block}

Björn Dieding@xrow.de

Wednesday 20 October 2004 2:30:12 am

My guess:
I think if you are using mysql you can do this by upgrading to Mysql 4.1.X.

There are comando line scripts shipped with mysql to convert dbs into other charset.

Check the mysql docs.

Looking for a new job? http://www.xrow.com/xrow-GmbH/Jobs
Looking for hosting? http://hostingezpublish.com
-----------------------------------------------------------------------------
GMT +01:00 Hannover, Germany
Web: http://www.xrow.com/

Mikhail Chekanov

Wednesday 20 October 2004 3:25:50 am

For Mysql:
1. Dump the database to file and convert it to UTF with iconv.
2. Replace all occurrences of "KOI-8" in this file with "UTF-8"
3. reCreate db from dump :)
But: latest beta of MySQL 4.1 has a bug - http://www.ez.no/community/bug_reports/mysql_error_1071_with_utf8_db_on_kernel_injection
so you should use iso8859-13
Does it support cyrillic charcters?

--
mike
#6595551

Vytautas Germanavičius

Wednesday 20 October 2004 6:42:01 am

I think, this was reason, why site with converted data did not work fo me.
Does EZ 3.4.1 use different from 3.3.3 db structure ?

iso-8859-13 is contains latin and baltic character sets.
only UTF-8 encoding has both character sets lithuanian and russian

Another question, is any way to export from 3.3.3 and import to 3.4.1 only MY entered data without EZ system data?

{set-block scope=root variable=cache_ttl}0{/set-block}

Mikhail Chekanov

Thursday 21 October 2004 3:22:08 am

>Does EZ 3.4.1 use different from 3.3.3 db structure ?
Yes. Not entirely different, though not exactly the same.

Another question, is any way to export from 3.3.3 and import to 3.4.1 only MY entered data without EZ system data?
Yes. Look for upgrade scripts in /update/database/mysql/

--
mike
#6595551

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.

eZ debug

Timing: Jan 19 2025 19:59:15
Script start
Timing: Jan 19 2025 19:59:15
Module start 'layout'
Timing: Jan 19 2025 19:59:15
Module start 'content'
Timing: Jan 19 2025 19:59:16
Module end 'content'
Timing: Jan 19 2025 19:59:16
Script end

Main resources:

Total runtime1.2803 sec
Peak memory usage4,096.0000 KB
Database Queries65

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0048 590.5469152.6406
Module start 'layout' 0.00480.0025 743.187539.4766
Module start 'content' 0.00731.2717 782.6641600.0938
Module end 'content' 1.27900.0013 1,382.757812.1406
Script end 1.2803  1,394.8984 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00300.2353160.0002
Check MTime0.00120.0958160.0001
Mysql Total
Database connection0.00070.057010.0007
Mysqli_queries1.219995.2795650.0188
Looping result0.00070.0520630.0000
Template Total1.252797.820.6263
Template load0.00160.128620.0008
Template processing1.251097.708520.6255
Template load and register function0.00030.024110.0003
states
state_id_array0.00080.059410.0008
state_identifier_array0.00090.070720.0005
Override
Cache load0.00140.1102330.0000
Sytem overhead
Fetch class attribute can translate value0.00140.109130.0005
Fetch class attribute name0.00160.123170.0002
XML
Image XML parsing0.00390.301930.0013
class_abstraction
Instantiating content class attribute0.00000.001380.0000
General
dbfile0.00350.2771220.0002
String conversion0.00000.000540.0000
Note: percentages do not add up to 100% because some accumulators overlap

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1node/view/full.tplfull/forum_topic.tplextension/sevenx/design/simple/override/templates/full/forum_topic.tplEdit templateOverride template
3content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
5content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
7content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
7content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 24
 Number of unique templates used: 6

Time used to render debug report: 0.0001 secs