FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » FUDforum » FUDforum Suggestions » Global Configuration and UTF-8 support
Show: Today's Messages :: Unread Messages :: Show Polls :: Message Navigator
| Subscribe to topic | Bookmark topic 
Switch to threaded view of this topic Create a new topic Submit Reply
Global Configuration and UTF-8 support [message #30275] Wed, 15 February 2006 03:40 Go to next message
rhinofly is currently offline  rhinofly   China
Messages: 15
Registered: August 2004
Karma: 0
Junior Member
add to buddy list
ignore all messages by this user

Global Configuration and UTF-8 support

Hi all,

I have just installed a fresh fudforum v2.7.4,and found something about Global Configuration and UTF-8 support.

The new forum is using zh_CN.UTF-8 lang,after I login as administrator and setup the forum title,the "Global Configuration" page looks like:
index.php?t=getfile&id=2392&private=0

What happen?

The Global Configuration script save UTF-8 title in to GLOBALS.php then load it back.

Because GLOBALS.php is save in and must save in plain Unix format,so
index.php?t=getfile&id=2393&private=0
is the only way to save UTF-8 title.

But,can we convert it back to UTF-8 when display the title in "Global Configuration" page?It may make fudform perfect then befor.

[edit]The browser is firfox 1.5.0.1.

Thanks for your work.

[Updated on: Wed, 15 February 2006 03:48]

Report message to a moderator

Re: Global Configuration and UTF-8 support [message #30288 is a reply to message #30275] Wed, 15 February 2006 10:43 Go to previous messageGo to next message
Ilia is currently offline  Ilia   Canada
Messages: 13241
Registered: January 2002
Karma: 0
Senior Member
Administrator
Core Developer
add to buddy list
ignore all messages by this user
Is the character set of the admin page (check meta tag) set to UTF-8?

FUDforum Core Developer
Re: Global Configuration and UTF-8 support [message #30299 is a reply to message #30275] Thu, 16 February 2006 08:37 Go to previous messageGo to next message
rhinofly is currently offline  rhinofly   China
Messages: 15
Registered: August 2004
Karma: 0
Junior Member
add to buddy list
ignore all messages by this user

I found the answer:
In the 'Global Configuration' page source:
<html>
<head>
<link rel="StyleSheet" href="adm.css" type="text/css">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8
">
</head>
<body>
<table class="maintable">
<tr>
<td class="linkdata">
<table class="linktable">
<tr>
<td>

Make a attention at the '\n' after 'charset=utf-8'.

if change the html to:
<html>
<head>
<link rel="StyleSheet" href="adm.css" type="text/css">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body>
<table class="maintable">
<tr>
<td class="linkdata">
<table class="linktable">
<tr>
<td>

that is not a '\n' after 'charset=utf-8',everything will be ok.

Is this a compatibility problem of firefox?

Here is the modify to fix it:
file: adm/admpanel.php line 1-12
<html>
<head>
<link rel="StyleSheet" href="adm.css" type="text/css">
<meta http-equiv="Content-Type" content="text/html; charset=<?php
				//rhinofly
        if (file_exists($DATA_DIR . 'thm/' . $usr->theme_name . '/i18n/' . $usr->lang . '/charset')) {
                $char=trim(file_get_contents($DATA_DIR . 'thm/' . $usr->theme_name . '/i18n/' . $usr->lang . '/charset'));
        } else if (file_exists($DATA_DIR . 'thm/default/i18n/' . $usr->lang . '/charset')) {
                $char=trim(file_get_contents($DATA_DIR . 'thm/default/i18n/' . $usr->lang . '/charset'));
        } else {
                $char='us-ascii';
        }    
        echo $char;
?>">


the code is copy from http://cvs.prohost.org/c/index.cgi/FUDforum/chngview?cn=7550 .
Re: Global Configuration and UTF-8 support [message #30303 is a reply to message #30299] Thu, 16 February 2006 10:12 Go to previous messageGo to next message
Ilia is currently offline  Ilia   Canada
Messages: 13241
Registered: January 2002
Karma: 0
Senior Member
Administrator
Core Developer
add to buddy list
ignore all messages by this user
Fixed in CVS, here is the patch:
http://cvs.prohost.org/c/index.cgi/FUDforum/chngview?cn=7551


FUDforum Core Developer
Re: Global Configuration and UTF-8 support [message #30329 is a reply to message #30275] Fri, 17 February 2006 20:09 Go to previous message
rhinofly is currently offline  rhinofly   Hong Kong
Messages: 15
Registered: August 2004
Karma: 0
Junior Member
add to buddy list
ignore all messages by this user

It's work,thanks.

http://cvs.prohost.org/c/index.cgi/FUDforum/chngview?cn=7552

[Updated on: Fri, 17 February 2006 20:09]

Report message to a moderator

Quick Reply
Formatting Tools:   
  Switch to threaded view of this topic Create a new topic
Previous Topic: Hidden forum
Next Topic: admin email visible
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Mon Dec 18 09:45:27 EST 2017

Total time taken to generate the page: 0.00721 seconds