1
Ganga
upgrade problem with Croatian characters
  • 2009/11/24 10:58

  • Ganga

  • Just popping in

  • Posts: 24

  • Since: 2007/10/22


Hello Everyone,
I made upgrade from 2.18.2 to 2.4.1 and it worked all ...
Croatian XOOPS 2.4.1 UTF-8
Croatian language modules, all UTF-8
Page works great Croatian characters (??žš?) are there.
Now I have but the problem is that in the forum / NewBB and converts it into news with the Croatian characters in? um. (only in old posts on nine everything is ok)

In the database are properly displayed:
-- phpMyAdmin SQL Dump
-- version 2.11.8.1deb1
-- http://www.phpmyadmin.net
-- 
-- 
Hostlocalhost
-- Erstellungszeit24. November 2009 um 10:55
-- Server Version5.0.67
-- PHP-Version5.2.6-2ubuntu4.2

SET FOREIGN_KEY_CHECKS
=0;

SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO";

SET AUTOCOMMIT=0;
START TRANSACTION;


/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8 */;

-- 
-- 
Datenbank: `h24`
-- 

-- --------------------------------------------------------

-- 
-- 
Tabellenstruktur für Tabelle `xoops_bb_categories`
-- 
-- 
Erzeugt am22. November 2009 um 18:46
-- Aktualisiert am22. November 2009 um 18:46
-- Letzter Check am22. November 2009 um 18:46
-- 

DROP TABLE IF EXISTS `xoops_bb_categories`;
CREATE TABLE IF NOT EXISTS `xoops_bb_categories` (
  `
cat_idsmallint(3unsigned NOT NULL auto_increment,
  `
cat_imagevarchar(50) default NULL,
  `
cat_titlevarchar(100NOT NULL default '',
  `
cat_descriptiontext NOT NULL,
  `
cat_ordersmallint(3unsigned NOT NULL default '0',
  
PRIMARY KEY  (`cat_id`),
  
KEY `cat_order` (`cat_order`)
ENGINE=MyISAM  DEFAULT CHARSET=utf8 AUTO_INCREMENT=12 ;

-- 
-- 
Daten für Tabelle `xoops_bb_categories`
-- 

INSERT INTO `xoops_bb_categories` (`cat_id`, `cat_image`, `cat_title`, `cat_description`, `cat_order`) VALUES
(1NULL'Bosna i Hercegovina Regionalno(Županijski)'''0),
(
2NULL'Društvo Kultura i Zabava'''4),
(
3NULL'Hrvatska Regionalno'''5),
(
4NULL'Ljubav,sex,erotika  na hercegova?ki na?in'''3),
(
5NULL'Sport'''7),
(
6NULL'Ra?unala, Internet i Mobitel(export-import)'''8),
(
7NULL'Hercegovina24.de/Hercegovina24.com'''9),
(
8NULL'Politika i Povjest'''1),
(
9NULL'Dijaspora Regionalno'''6),
(
10NULL'Free Zone'''2),
(
11NULL'Muški-Ženski kutak'''2);

SET FOREIGN_KEY_CHECKS=1;

COMMIT;


but if I play backup to new XOOPS because looks like this:

Resized Image

I charged everything but I have not found help ...

who can help please

p.s.sorry for my english:(

2
ghia
Re: upgrade problem with Croatian characters
  • 2009/11/24 12:01

  • ghia

  • Community Support Member

  • Posts: 4953

  • Since: 2008/7/3 1


Your database seems to be latin1. The collation is not reported.
Change mainfile.php and global.php to use latin1 and ISO-....
You need also ansi language files for your core and modules.

Conversion of your database to UTF-8 is also possible, but not easy or strait forward. You could attempt by converting the format of your backup SQL file from ansi to UTF-8 without BOM by Notepad++. (Also changing character sets and collation directives in this file)

3
deka87
Re: upgrade problem with Croatian characters
  • 2009/11/24 12:13

  • deka87

  • Friend of XOOPS

  • Posts: 1125

  • Since: 2007/10/5


there is a great tool for XOOPS upgrade encoding conversion on xoops2.ru by andrey3761. some well scripts that will do the work for you plus the manual. it's being tested now. once it's prepared, it should be up at xoops.org.

4
Mamba
Re: upgrade problem with Croatian characters
  • 2009/11/24 12:33

  • Mamba

  • Moderator

  • Posts: 11409

  • Since: 2004/4/23


Quote:
there is a great tool for XOOPS upgrade encoding conversion on xoops2.ru by andrey3761.

WOW!!! Fantastic News!!!

5
Ganga
Re: upgrade problem with Croatian characters
  • 2009/11/24 15:48

  • Ganga

  • Just popping in

  • Posts: 24

  • Since: 2007/10/22


Quote:
Your database seems to be latin1. The collation is not reported.
Change mainfile.php and global.php to use latin1 and ISO-....
You need also ansi language files for your core and modules.

Conversion of your database to UTF-8 is also possible, but not easy or strait forward. You could attempt by converting the format of your backup SQL file from ansi to UTF-8 without BOM by Notepad++. (Also changing character sets and collation directives in this file)


Thanks for your reply

My complete database is already in utf8_general_ci

Resized Image


and if I open the edditor is already UTF-8 without BOM...

Quote:
by deka87
there is a great tool for XOOPS upgrade encoding conversion on xoops2.ru by andrey3761. some well scripts that will do the work for you plus the manual. it's being tested now. once it's prepared, it should be up at xoops.org.

I already tried all the functions


6
bjuti
Re: upgrade problem with Croatian characters
  • 2009/11/24 16:28

  • bjuti

  • Just can't stay away

  • Posts: 871

  • Since: 2009/1/7 2


I have similar problem. The letter "š" is written like "scaron" o something.

7
ghia
Re: upgrade problem with Croatian characters
  • 2009/11/24 18:16

  • ghia

  • Community Support Member

  • Posts: 4953

  • Since: 2008/7/3 1


Was your database from the beginning always in UTF-8?

8
Ganga
Re: upgrade problem with Croatian characters
  • 2009/11/24 19:15

  • Ganga

  • Just popping in

  • Posts: 24

  • Since: 2007/10/22


Quote:
Was your database from the beginning always in UTF-8?


was in latin1
--------

bjuti koja je kod tebe prije verzija xoopsa bila(pre 2.4) 2.33?

9
ghia
Re: upgrade problem with Croatian characters
  • 2009/11/24 21:16

  • ghia

  • Community Support Member

  • Posts: 4953

  • Since: 2008/7/3 1


That is what I tought. And how did you make the conversion?

10
Ganga
Re: upgrade problem with Croatian characters
  • 2009/11/24 21:48

  • Ganga

  • Just popping in

  • Posts: 24

  • Since: 2007/10/22


Quote:
by ghia That is what I tought. And how did you make the conversion?
with this convert.php

// convert tvoj xoops

ini_set ('max_execution_time''6000');
include_once 
'mainfile.php';
// ??????????? ??????
if( ! empty( $_POST['convert'] ) ) {

    include 
XOOPS_ROOT_PATH.'/header.php';
    
    
$old_prefix XOOPS_DB_PREFIX;

    
$srs $xoopsDB->queryF'SHOW TABLE STATUS FROM `'.XOOPS_DB_NAME.'`' ) ;

    if( ! 
$xoopsDB->getRowsNum$srs ) ) die( "You are not allowed to copy tables" ) ;

    
$count 0;
    while( 
$row_table $xoopsDB->fetchArray$srs ) ) {
        
$count ++ ;
        
$old_table $row_table['Name'] ;
        
// ???? ?????? ??????? ?? ???????? ???????? ??????, ?? ??????????...
        
if( substr$old_table strlen$old_prefix ) + ) !== $old_prefix '_' ) continue ;
        
        
// ???????????? ??????? ? utf8
        
$sql 'ALTER TABLE `'.$old_table.'` CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci';
        if(
$xoopsDB->queryF($sql)) {
            echo 
'ok - '.$sql.'';
        } else {
            echo 
$xoopsDB->error().' - '.$sql.'';
        }
        
// ????????????? ????????? ????????????? ??????
        
$sql 'ALTER TABLE `'.$old_table.'` DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci';
        if(
$xoopsDB->queryF($sql)) {
            echo 
'ok - '.$sql.'';
        } else {
            echo 
$xoopsDB->error().' - '.$sql.'';
        }

    }
    
    
// ????????????? ????????? ???? ??????
    
$sql 'ALTER DATABASE `'.XOOPS_DB_NAME.'` DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci';
    if(
$xoopsDB->queryF($sql)) {
        echo 
'ok - '.$sql.'';
    } else {
        echo 
$xoopsDB->error().' - '.$sql.'';
    }
    include 
XOOPS_ROOT_PATH.'/footer.php';

// ????? ?????
} else {
    include 
XOOPS_ROOT_PATH.'/header.php';
    
xoops_confirm(array('convert' => 1), 'convert.php''Convert in utf8?');
    include 
XOOPS_ROOT_PATH.'/footer.php';
}



?>

Login

Who's Online

360 user(s) are online (252 user(s) are browsing Support Forums)


Members: 0


Guests: 360


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Nov 30
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits