Hi, after installing the 05.05.05 nighty i get the following, have tried different collations already...
For any suggestions i'd be glad
Datum:
Warning: mb_convert_encoding() [function.mb-convert-encoding]: Illegal character encoding specified in C:\www\gallery\modules\core\classes\GalleryPhpVm.class on line 70
05/05/05
Anzahl: 0 Elemente
Besitzer/in: Gallery Administrator
----
Gallery URL (optional):
Gallery version:
Webserver (with version):
Datatabase (with version):
PHP version (eg 4.2.1): 5.04
phpinfo URL (optional):
Graphics Toolkit(s): gd2
Operating system: wamp
Web browser/version:
G1 version (for migration bugs):
Posts: 8601
it prints that on every page? does the page display correctly otherwise? you didn't mention which locale you're using, i gather de_DE?
Posts: 6
Hi,
i switched to the beta2 which works perfectly.
It is displayed on every album but otherwise the page is fine.
I tried using english and german with gettext and without
Posts: 8601
what OS is "wamp"?
if you try a recent version again, try putting
print $locale;
at line 52 of modules/core/classes/helpers/GalleryCharsetHelper_simple.class (right after the $locale = line)
and let us know what it prints.
Posts: 6
hi, wamp is:
windows xp pro sp2
apache 2.053
mysql 4.1.11
php 5.04
i will try that later although i got beta2 running meanwhile, but i will play the tester here
Posts: 2
i get the same error on:
Gallery version = 2.0-beta-2+ core 0.9.16
PHP version = 4.3.10 cgi
Webserver = Apache/1.3.29
Database = mysqlt 4.0.18-log
Toolkits = ImageMagick, NetPBM, Gd, AlbumTestToolkit
Operating system = FreeBSD zirx.pair.com 4.8-STABLE FreeBSD 4.8-STABLE #0: Thu Apr i386
Browser = Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322)
Posts: 2
ok. i fixed it by changing the _setlocale function in the GalleryTranslator class
"ISO8859-1" should be "ISO-8859-1"
the other chartset probably also need to be changed.
Posts: 314
could you please get the lates nightly, remove the changes that you made and see if the problem is still there. If it is you may report it here and/or also here: http://gallery.menalto.com/index.php?name=PNphpBB2&file=viewtopic&t=29744
Posts: 5
I got the following warning message on my windows machine. I am running the code from CVS on 5/10 and my language setting is US english.
PHP 4.3.11
windows XP
apache 2.0.53
Warning: mb_convert_encoding(): Illegal character encoding specified in C:\xampp\htdocs\gallery2\modules\core\classes\GalleryPhpVm.class on line 70
After some debugging, I found that the third parameter to mb_convert_enconding is NULL so I change the GalleryPhpVm::mb_convert_encoding to
function mb_convert_encoding($string, $outCharset, $inCharset) {
if ($inCharset == NULL) {
return mb_convert_encoding($string, $outCharset);
} else {
return mb_convert_encoding($string, $outCharset, $inCharset);
}
}
the warning message disapeared.
Posts: 8601
superbird, thanks for the tip.. I'm applying a fix further up in the code so we don't call this function with null $inCharset.. (calling mb_convert_encoding from mb's internal encoding was not our intention here).
Posts: 5
Mindless,
Sounds good. Please let me know when the fix is ready so I can apply it.
Posts: 8601
went into cvs yesterday.. update from cvs or get the current nightly snapshot.
Posts: 6
fine, quick fixes aound here
Posts: 2
I just performed a CVS style install, and it still has the issuse. By changing line 298 in gallery2/modules/core/classes/GalleryTranslator.class to read as follows, it fixes the problem.
foreach (array('ISO-8859-1', 'ISO-8859-2', 'ISO-8859-5', 'ISO-8859-7', 'ISO-8859-9',
Could someone PLEASE check this into CVS? Thank you!
Posts: 32509
we shouldn't change
foreach (array('ISO8859-1', 'ISO8859-2', 'ISO8859-5', 'ISO8859-7', 'ISO8859-9',
toforeach (array('ISO-8859-1', 'ISO-8859-2', 'ISO-8859-5', 'ISO-8859-7', 'ISO-8859-9',
, we should simply add both cases, with and without the hyphen.Google shows that for some distributions the format without hyphen is used (freebsd, ...) and for a lot others the format with hyphen is used.
so the complete section should look like:
Posts: 8601
fine with me, if you add to the comment an example OS that uses the hyphen.. Ellipse didn't seem to mention what OS..
Posts: 32509
in cvs now.
get tomorrows nightly snapshot if you need this fix.
Posts: 2
Sorry about that. I believe it is on a FreeBSD system.
Unfortunately, when I make that change, it breaks again.
Since I am not a PHP programmer, just an HTML hacker (in the classic sense, not the modern media definition), I am not sure how this can be corrected for everyone.
However, is there a way to check what operating system it is running on, or have a better error handling process?
Posts: 32509
did you take the change i posted here in the forums and applied it? or did you already update your version from cvs / nightly snapshot? because cvs / nightly snapshot are still using the old code.
google searching says it's ISO8859-* for freebsd, not ISO-8859-*, so it's not necessarily determined by the os.