forum.coppermine-gallery.net

Support => cpg1.3.x Support => Older/other versions => cpg1.3 Miscellaneous => Topic started by: Breach on August 21, 2004, 11:54:51 pm

Title: [fixed] Bulgarian-utf8 support is broken
Post by: Breach on August 21, 2004, 11:54:51 pm
Tried 4 browsers no avail - the bulgarian utf8 support appears as gibberish..
Title: Re: Bulgarian-utf8 support is broken
Post by: Joachim Müller on August 22, 2004, 12:02:40 am
edit it with a text editor and see if it contains strange characters like
Quote
ï"¿
at the very start, right before
Code: [Select]
<?phpIf they are there, delete them.

GauGau
Title: Re: Bulgarian-utf8 support is broken
Post by: Breach on August 22, 2004, 12:15:13 am
Done :) The end result is still gibberish... :(
Title: Re: Bulgarian-utf8 support is broken
Post by: Joachim Müller on August 22, 2004, 10:05:15 am
link?

GauGau
Title: Re: Bulgarian-utf8 support is broken
Post by: Breach on August 22, 2004, 11:02:20 am
http://photos.ivanchev.org/

Default is english-utf8, select language is available.
Title: Re: Bulgarian-utf8 support is broken
Post by: Joachim Müller on August 23, 2004, 12:03:00 am
does http://photos.ivanchev.org/index.php?lang=bulgarian (windows-1251 charset) work for you?

GauGau
Title: Re: Bulgarian-utf8 support is broken
Post by: Breach on August 23, 2004, 12:09:07 am
Yep! Though it does not select the browser-side encoding as windows-1251 initially... Unicode would be better though ;-) It's sort of perplexing how a default charset is selected in the first place - apache2.conf gives an option for a default (which I set to utf8), then there's browser ability to request a language via the GETs, and then there's a default encoding specified in the language files for Coppermine (windows-1251)...
Title: Re: Bulgarian-utf8 support is broken
Post by: Joachim Müller on August 23, 2004, 12:19:33 am
try re-converting the windows charset file bulgarian-utf-8.php, using http://www.iconv.com/iconv.htm
You will have to edit the file and replace
Code: [Select]
$lang_charset = 'windows-1251';with
Code: [Select]
$lang_charset = 'utf-8';. Save it as bulgarian-utf-8.php. Please report if this worked for you.

GauGau
Title: Re: Bulgarian-utf8 support is broken
Post by: Breach on August 23, 2004, 12:33:04 am
Done - Negative - I still get the same gibberish, so I'd reckon the converter goes wrong at some point... Did a WINDOWS-1251 -> UTF-8 and WINDOWS-1251 ->UTF8 (what's the difference?!) still the same result.
Title: Re: Bulgarian-utf8 support is broken
Post by: Joachim Müller on August 23, 2004, 12:37:10 am
hrm, not sure what's wrong. As a workaround, paste the contents of bulgarian.php into bulgarian-utf-8.php and save it. This way, your bulgarian language file will not actually be utf-8, but the language selector on your page is suppossed to work then.

GauGau
Title: Re: Bulgarian-utf8 support is broken
Post by: Breach on August 23, 2004, 12:52:27 am
Fixed!! :-) Oh joy! Thanks to the wonderful script at:

http://asuult.net/badaa/convert/con2uni.htm

I am also attaching the final version - Folks shall need to put it into their respective coppermine/lang dir rename it back to .php, and:

chown $apache_uid$:$apache_gid$ bulgarian-utf-8.php
chmod 666 bulgarian-utf-8.php

Ah, that was fun ;-)