charset problems [message #164192] |
Sat, 08 January 2011 13:19 |
valpis
Messages: 7 Registered: July 2008
Karma: 0
|
Junior Member |
|
|
I am in the process of moving the forum from an FreeBSD to Linux server and during the time also upgrade from 2.7.6 to 3.0.2.
The only thing I can't figure out is how to get the swedish characters corrctly displayed.
The messages is stored in files, running file on one message file gets me:
msg_50000: ISO-8859 text, with very long lines, with CRLF line terminators
The database is in UTF-8, I have changed the charset in the template to UTF-8. I have rebuild the theme, I have runned compress messages, but still gets garbage on the text read from files (from db everything is ok).
I treied to run iconv on the files, but that of course changed the offsets on the messages in the file
/johan
|
|
|
Re: charset problems [message #164193 is a reply to message #164192] |
Sat, 08 January 2011 13:35 |
valpis
Messages: 7 Registered: July 2008
Karma: 0
|
Junior Member |
|
|
and after some more reading there seems lika I should have an extra option when chosing compress messages for changing charset, this one I doesn't get, but I have this enabled in php
iconv support => enabled
iconv implementation => glibc
iconv library version => 2.5
iconv.input_encoding => ISO-8859-1 => ISO-8859-1
iconv.internal_encoding => ISO-8859-1 => ISO-8859-1
iconv.output_encoding => ISO-8859-1 => ISO-8859-1
|
|
|
|
|
|
Re: charset problems [message #164198 is a reply to message #164197] |
Sat, 08 January 2011 13:53 |
valpis
Messages: 7 Registered: July 2008
Karma: 0
|
Junior Member |
|
|
created this:
<?php if (@extension_loaded('iconv')) {
print('installed');
}else {
print('not installed');
}
?>
and the output gave me "installed"
but the I added some debug output in compact.php, and that condition never returned true
[Updated on: Sat, 08 January 2011 14:03] Report message to a moderator
|
|
|
Re: charset problems [message #164200 is a reply to message #164198] |
Sat, 08 January 2011 16:22 |
valpis
Messages: 7 Registered: July 2008
Karma: 0
|
Junior Member |
|
|
I did a clean installation of 3.0.2 now instead of the upgrading path, but the same result.
For what it is worth, my system info (Centos 5.3):
FUDforum version: 3.0.2
PHP version: 5.1.6
PHP built on: Linux 2.6.18-028stab069.6-ent #1 SMP Wed May 26 18:25:22 MSD 2010 i686
Database type: mysql (mysql)
Database version: 5.0.77
Web server: Apache/2.2.3 (CentOS)
Web Server load: 0
Web server to PHP interface: apache2handler
WebServer User/Group: 48 / 48
Relevant PHP settings:
Safe mode: OFF
Open basedir: none
Display errors: OFF
File uploads: ON
Maximum file upload size: 2M
Magic quotes: OFF
Register globals: OFF
Output buffering: Yes
Disabled functions: none
PSpell support: Yes
Zlib support: Yes
|
|
|
|
Re: charset problems [message #164202 is a reply to message #164201] |
Sat, 08 January 2011 17:21 |
valpis
Messages: 7 Registered: July 2008
Karma: 0
|
Junior Member |
|
|
well, actually it was a problem in FUD, in compact.php the code looked like this
<!-- REMOVE
<?php if (@extension_loaded('iconv')) {
and by removing the line with REMOVE (and the corresponding end comment) it actually worked
|
|
|