« Project home page
my little forum
Log in
Register
Search:
Back to the entry by Irene König
Post reply
Reply to the message by
Irene König
Name:
E-mail:
(optional, won't be displayed directly)
Leave this field empty:
Homepage:
(optional)
Leave this field empty:
Location:
(optional)
Remember me (cookie)
Category:
General
Project organisation
Technics
Design/Themes
Features
Development
Todo
Bugs
German / Deutsch
Spanish / Español
French / Français
Accessibility/UX
Subject:
Formatting help
skip to input
format text bold
[b]bold text[/b]
format text italic
[i]italic text[/i]
insert hyperlink
[link=http://example.com/]link text[/link] / [link]http://example.com/[/link]
set text color
[color=#rgb]colored text[/color]
font size
[size=small]small text[/size]
[size=large]large text[/size]
insert list
[list][*]list item[/list]
insert image
[img]http://example.com/image.jpg[/img]
left: [img=left]http://example.com/image.jpg[/img]
right: [img=right]http://example.com/image.jpg[/img]
thumbnail: [img=thumbnail]http://example.com/image.jpg[/img]
thumbnail left: [img=thumbnail-left]http://example.com/image.jpg[/img]
thumbnail right: [img=thumbnail-right]http://example.com/image.jpg[/img]
upload image
upload image ...
insert TeX code
[tex]TeX code[/tex]
insert code
[inlinecode]code[/inlinecode]
[code]code[/code]
[code=css]code[/code]
[code=html]code[/code]
[code=javascript]code[/code]
[code=perl]code[/code]
[code=php]code[/code]
[code=sql]code[/code]
[code=xml]code[/code]
:-)
;-)
:-P
:-D
:-|
:-(
:yes:
:no:
:ok:
:lol:
:lol2:
:lol3:
:cool:
:surprised:
:angry:
:crying:
:waving:
:confused:
:lookaround:
:clap:
:love:
:tick:
Message:
> Hallo zusammen! > > Ich überlege, mein Forum von der 1er- auf die 2er-Version umzustellen. Es läuft seit 2006 ohne Probleme und war von Anfang an UTF8 kodiert, da auch u.a. Russisch geschrieben wird. Das Script hatte ich dementsprechend angepasst. Ich bin in PHP allerdings nicht versiert, muss ich dazusagen. > > Nun mein Problem: das Backupscript geht ja davon aus, dass das 1.7-Forum ISO-8859-1 kodiert ist und kodiert also in UTF8 um. Nicht nur, dass ich das nicht brauche, es zerschießt mir logischerweise die kyrillischen Buchstaben und ersetzt sie mit einem Fragezeichen. > > Könnte mir bitte jemand einen Hinweis geben, wie ich die nicht benötigte Umkodierung "abschalten" kann? Ich poste unten den entsprechenden Code-Schnippsel aus dem Script. > > Backup und Einspielen in die Version 2.2 hat ansonsten problemlos geklappt, danke dafür! Auf andere Fehler habe ich noch nicht geschaut, das Problem mit der unerwünschten Umkodierung ist vorrangig. > > [code=php] > class Backup > { > var $start_time; > var $check_time; > var $file; > var $dump = ''; > var $queries = 0; > var $max_queries = 300; > var $errors = Array(); > > function Backup() > { > @set_time_limit(30); > $this->start_time = time(); > $this->check_time = $this->start_time; > } > > function set_max_queries($max_queries) > { > $this->max_queries = $max_queries; > } > > function set_file($file) > { > $this->file = $file; > } > > function assign($data) > { > $this->dump .= utf8_encode($data); > $this->queries++; > > $now = time(); > if(($now-25) >= $this->check_time) > { > $this->check_time = $now; > @set_time_limit(30); > } > > if($this->queries >= $this->max_queries) > { > // buffer: > $this->save(); > $this->queries = 0; > } > } > > function save() > { > if($this->dump != '') > { > if(empty($this->file)) > { > $this->file = 'mlf_1.7_backup_'.date("YmdHis").'.sql'; > } > if($handle = fopen($this->file, 'a+')) > { > #flock($fp, 2); > fwrite($handle, $this->dump); > #flock($fp, 3); > fclose($handle); > $this->dump = ''; > } > else > { > $this->errors[] = 'Could not write backup file!'; > } > } > if(empty($errors)) > { > return true; > } > else > { > return false; > } > } > } > > [/code]
E-mail notification on reply of this posting
OK - Submit
Preview