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

Home » FUDforum » FUDforum Installation Issues » 2.7.2 to 2.7.6, chinese to utf-8
Show: Today's Messages :: Polls :: Message Navigator
Switch to threaded view of this topic Create a new topic Submit Reply
2.7.2 to 2.7.6, chinese to utf-8 [message #34795] Fri, 17 November 2006 20:17 Go to next message
redhat71   China
Messages: 32
Registered: February 2003
Karma: 0
Member

the upgrade completes without error, but the old messages use gb2312 while the new forum uses utf-8

any suggestion? thanks
Re: 2.7.2 to 2.7.6, chinese to utf-8 [message #34821 is a reply to message #34795] Sun, 19 November 2006 16:40 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
You can change the charset setting in the theme back to gb2312

FUDforum Core Developer
Re: 2.7.2 to 2.7.6, chinese to utf-8 [message #34826 is a reply to message #34821] Sun, 19 November 2006 18:27 Go to previous messageGo to next message
redhat71   China
Messages: 32
Registered: February 2003
Karma: 0
Member

it is gb2312, i also tried to rebuild it, but somehow the forum just uses utf-8

index.php?t=getfile&id=2721&private=0
  • Attachment: gb2312.png
    (Size: 27.10KB, Downloaded 1944 times)
Re: 2.7.2 to 2.7.6, chinese to utf-8 [message #34838 is a reply to message #34826] Mon, 20 November 2006 19: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
Does the Content-Type meta tag show the correct charset? Also check to see what headers your PHP is sending, perhaps it is sending a header telling the browser that the content is UTF-8.

FUDforum Core Developer
Re: 2.7.2 to 2.7.6, chinese to utf-8 [message #34846 is a reply to message #34838] Mon, 20 November 2006 20:20 Go to previous messageGo to next message
redhat71   China
Messages: 32
Registered: February 2003
Karma: 0
Member

<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=utf-8">
Re: 2.7.2 to 2.7.6, chinese to utf-8 [message #34847 is a reply to message #34838] Mon, 20 November 2006 20:29 Go to previous messageGo to next message
redhat71   China
Messages: 32
Registered: February 2003
Karma: 0
Member

Ilia wrote on Tue, 21 November 2006 03:12

Also check to see what headers your PHP is sending, perhaps it is sending a header telling the browser that the content is UTF-8.


i don't know how to check that
but if i understand you right, in that case everything should be fine if i manually change the browser to gb2312

that's not the problem, the problem is the theme of the forum is actually in utf-8 although i've set it to GB2312 and rebuilt it

Re: 2.7.2 to 2.7.6, chinese to utf-8 [message #34849 is a reply to message #34846] Mon, 20 November 2006 20:35 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
if the header says utf-8 (as you've pasted) that would explain why the forum is in UTF-8. Did you rebuild the theme after making the change?

FUDforum Core Developer
Re: 2.7.2 to 2.7.6, chinese to utf-8 [message #34850 is a reply to message #34847] Mon, 20 November 2006 20:35 Go to previous messageGo to next message
redhat71   China
Messages: 32
Registered: February 2003
Karma: 0
Member

btw, i don't really care it's utf-8 or gb2312 as long as they don't mix up like now

if there's an easy way to convert everything to utf-8, it's the same to me

any help is appreciated, thanks
Re: 2.7.2 to 2.7.6, chinese to utf-8 [message #34851 is a reply to message #34849] Mon, 20 November 2006 20:36 Go to previous messageGo to next message
redhat71   China
Messages: 32
Registered: February 2003
Karma: 0
Member

Ilia wrote on Tue, 21 November 2006 04:35

if the header says utf-8 (as you've pasted) that would explain why the forum is in UTF-8. Did you rebuild the theme after making the change?


YES, i rebuilt it
Re: 2.7.2 to 2.7.6, chinese to utf-8 [message #34872 is a reply to message #34851] Tue, 21 November 2006 15:20 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
One more try Smile

Go into the theme/default/i18n/[language] directory and update the "charset" file within with the charset you want to use. Then rebuild the theme.


FUDforum Core Developer
Re: 2.7.2 to 2.7.6, chinese to utf-8 [message #34878 is a reply to message #34872] Tue, 21 November 2006 17:06 Go to previous messageGo to next message
redhat71   China
Messages: 32
Registered: February 2003
Karma: 0
Member

found the file in a different location:
MY_FOLDER_NAME/thm/default/i18n/chinese/

after i did the change and rebuilt, the charset in META is gb2312 now
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=gb2312">

however, the theme is still utf-8, it's still a mix up
Re: 2.7.2 to 2.7.6, chinese to utf-8 [message #34879 is a reply to message #34878] Tue, 21 November 2006 17:12 Go to previous messageGo to next message
redhat71   China
Messages: 32
Registered: February 2003
Karma: 0
Member

also found another file at the same place: "locale"
the content of the file is zh_CN.UTF-8, tried to change that to GB2312 as well and rebuilt again, still the same
Re: 2.7.2 to 2.7.6, chinese to utf-8 [message #34896 is a reply to message #34879] Wed, 22 November 2006 15:21 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
I presume you are referring to the text itself, that's UTF8 because the translation is UTF-8. To put it back to gb2312 you need to use iconv to convert the msg file contents from utf-8 to gb2312.

FUDforum Core Developer
Re: 2.7.2 to 2.7.6, chinese to utf-8 [message #34903 is a reply to message #34896] Wed, 22 November 2006 18:11 Go to previous messageGo to next message
redhat71   China
Messages: 32
Registered: February 2003
Karma: 0
Member

Ilia wrote on Wed, 22 November 2006 23:21

I presume you are referring to the text itself, that's UTF8 because the translation is UTF-8. To put it back to gb2312 you need to use iconv to convert the msg file contents from utf-8 to gb2312.


no, i mean the actual content

anyway, it doesn't matter, i checked my original ones
index.php?t=getfile&id=2725&private=0

then modified both file accordingly and rebuilt again, same as above

changing the file "charset" from utf-8 to gb2312 and rebuilding the theme results in
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=gb2312">

changing the file "locale" from zh_CN.UTF-8 to zh_CN and rebuilding the theme does NOT seem to make any difference
  • Attachment: 1.png
    (Size: 16.73KB, Downloaded 1763 times)

[Updated on: Wed, 22 November 2006 18:12]

Report message to a moderator

Re: 2.7.2 to 2.7.6, chinese to utf-8 [message #34918 is a reply to message #34903] Thu, 23 November 2006 14:25 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
The message content is stored inside msg files it cannot be easily converted to another language type.

FUDforum Core Developer
Re: 2.7.2 to 2.7.6, chinese to utf-8 [message #34921 is a reply to message #34918] Thu, 23 November 2006 14:56 Go to previous messageGo to next message
redhat71   China
Messages: 32
Registered: February 2003
Karma: 0
Member

Ilia wrote on Thu, 23 November 2006 22:25

The message content is stored inside msg files it cannot be easily converted to another language type.


it's not the encoding, see the screenshot above
Re: 2.7.2 to 2.7.6, chinese to utf-8 [message #34927 is a reply to message #34921] Fri, 24 November 2006 16:10 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
locale and charset are two different things. Locale is only used for dates, while charset is used for the rest of the forum's text.

FUDforum Core Developer
Re: 2.7.2 to 2.7.6, chinese to utf-8 [message #34931 is a reply to message #34927] Fri, 24 November 2006 18:31 Go to previous messageGo to next message
redhat71   China
Messages: 32
Registered: February 2003
Karma: 0
Member

ok, any idea why changing the charset file to gb2312 and rebuilding the theme didn't work?
Re: 2.7.2 to 2.7.6, chinese to utf-8 [message #34945 is a reply to message #34931] Sun, 26 November 2006 16:19 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
if the meta tag is set then the forum does what's needed.

FUDforum Core Developer
Re: 2.7.2 to 2.7.6, chinese to utf-8 [message #34947 is a reply to message #34945] Sun, 26 November 2006 18:14 Go to previous messageGo to next message
redhat71   China
Messages: 32
Registered: February 2003
Karma: 0
Member

Ilia wrote on Mon, 27 November 2006 00:19

if the meta tag is set then the forum does what's needed.


you mean the "rebuild" process only changes the meta tag? then, do i have to find out all the files of the theme and convert them from utf-8 to gb2312 manually?
Re: 2.7.2 to 2.7.6, chinese to utf-8 [message #34962 is a reply to message #34947] Mon, 27 November 2006 23:59 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
The rebuild process rebuilds all the template files, which also means that the headers such as meta tags are reset.

FUDforum Core Developer
Re: 2.7.2 to 2.7.6, chinese to utf-8 [message #34966 is a reply to message #34962] Tue, 28 November 2006 01:13 Go to previous messageGo to next message
redhat71   China
Messages: 32
Registered: February 2003
Karma: 0
Member

i'm totally lost... where is the problem then?
Re: 2.7.2 to 2.7.6, chinese to utf-8 [message #34970 is a reply to message #34966] Tue, 28 November 2006 15:56 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
As far as I can tell here is the problem. Previously your forum was using gb2312 which means messages were written to disk & db using this encoding. The you upgraded to a version where the chinese translation uses utf-8 (meaning that the forum text (not messages) were not in utf-8 and any NEW messages would be posted in utf-8. This means that no matter what you would do, some messages would not show up properly.

The best solution which I had mentioned previously would be to convert the text inside the "msg" file to bg2312, which would allow you to use the forum with the gb2312 character set and have the old messages display properly.


FUDforum Core Developer
Re: 2.7.2 to 2.7.6, chinese to utf-8 [message #34973 is a reply to message #34970] Tue, 28 November 2006 22:26 Go to previous messageGo to next message
redhat71   China
Messages: 32
Registered: February 2003
Karma: 0
Member

no, i'm talking about the THEME, not new messages

before upgrade:
the theme is gb2312, the files of the theme are gb2312

after upgrade:
the theme is utf-8, all the files of the theme are utf-8
changing the charset to gb2312 and rebuilding it only changes the Content-Type meta tag, the files are STILL utf-8

i thought the rebuilding process should rebuild all the files to gb2312 as well, did i misunderstand?
Re: 2.7.2 to 2.7.6, chinese to utf-8 [message #34978 is a reply to message #34973] Wed, 29 November 2006 15:14 Go to previous message
Ilia is currently offline  Ilia   Canada
Messages: 13241
Registered: January 2002
Karma: 0
Senior Member
Administrator
Core Developer
The theme text comes from the msg file, which is utf-8 in the new version. If you want to change it to gb2312 you can convert the text in it using iconv()

FUDforum Core Developer
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: install.php returns 20 bytes only
Next Topic: Cant for the life of me get install.php to work. Suse 10.1
Goto Forum:
  

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

Current Time: Wed Nov 27 21:22:43 GMT 2024

Total time taken to generate the page: 0.03049 seconds