On Tuesday 15 June 2004 08:09, Constans, Camille
(C.C.) wrote:
We'd love to, but we need to either a) take it
offline for a
few days or
b) invent a way to convert the database without
data loss or damage
while keeping it online.
-- brion vibber (brino @
pobox.com)
I suppose most of the time will be taken to convert old.
Shouldn't be possible to convert only cur while either leave
old unconvert
or mark each entrey in old as unconverted/still in iso-8859-1
and convert
these entries when they are needed or by a very low priority job?
(of course the soft will need to handle the conversion flag
when viewing on old version
of an article, doing a diff, ...)
Is this doable or still too complex?
It's possible. Just need to change a bit the software :) Just need to add
a flag UTF-8 as the soft add a flag gzip. And tell the soft to read as it
is.
I am thinking about an even simpler solution. Have server-side script
convert articles and their histories to UTF-8. Have a postprocessor
(written in C) tell if a page is in UTF-8 and change appropriate meta tag
if it is. It's vastly improbable that a UTF-8 page will not be in UTF-8, it
could be checked on a database dump and I don't believe that any such page
would be found. When all pages are converted, site could be switched to
UTF-8 and
postprocessor turned off.
This could even be doen without a postprocessor, there is PHP
mb_detect_encoding function which does exactly that.