problem with language encoding.

This is an archive of the phpBB 2.0.x support forum. Support for phpBB2 has now ended.
Forum rules
Following phpBB2's EoL, this forum is now archived for reference purposes only.
Please see the following announcement for more information: viewtopic.php?f=14&t=1385785
coldzero
Registered User
Posts: 116
Joined: Fri Apr 02, 2004 1:48 pm
Location: Viet Nam
Contact:

problem with language encoding.

Post by coldzero » Mon May 03, 2004 6:52 pm

I used vietnamese language for my forum.All i have to do is encode the lang_main.php(and others language file i want) to unicode,and edit it.
Everything seem to be ok,except onething.
In my forum, all vietnamese appears correctly,but the topic title when i'm on the viewtopic.php to view a topic (the text bellow phpbb logo),is wierd appearence.The vietnamese character transform to square characters.

Do any one know how to solve this and what i have to do?

coldzero
Registered User
Posts: 116
Joined: Fri Apr 02, 2004 1:48 pm
Location: Viet Nam
Contact:

Post by coldzero » Tue May 04, 2004 10:40 am

is there nobody can help me? :(

ScuL
Registered User
Posts: 111
Joined: Tue May 04, 2004 6:01 pm
Location: NZ

Post by ScuL » Tue May 04, 2004 6:03 pm

i have the same problem!
my forum uses a lot of languages including Japanese..

It displays the characters perfectly everywhere except in the title/subjects of posts....

Is there a workaround for this problem?

Besides the Japanese the subjects of posts also seem to have trouble with an ampersand. It shows up as &
Last edited by ScuL on Fri Apr 29, 2005 1:18 pm, edited 1 time in total.

ScuL
Registered User
Posts: 111
Joined: Tue May 04, 2004 6:01 pm
Location: NZ

Post by ScuL » Sat May 08, 2004 1:32 pm

No fix for it?

coldzero
Registered User
Posts: 116
Joined: Fri Apr 02, 2004 1:48 pm
Location: Viet Nam
Contact:

Post by coldzero » Sun May 09, 2004 6:22 pm

ScuL wrote: No fix for it?


i think nobody can help us. :(

patman3d
Registered User
Posts: 11
Joined: Tue Nov 16, 2004 11:19 am
Contact:

Post by patman3d » Tue Nov 16, 2004 11:25 am

I do not know if you guys got an answer to your question yet, but i've found a partial solution.

Change the font to a unicode type font. I think the font in question is Trebuchet MS. I too had the problem of the box and what not in the subject/topic section. I just changed this font to Arial.

Styles Admin - Management - then edited the styles' Font Face 2

Hope this helps.

japanforums.net
Registered User
Posts: 64
Joined: Tue Feb 24, 2004 2:19 am

Post by japanforums.net » Thu Dec 23, 2004 1:36 pm

there is a solution, i had it done on my site for Japanese titles, a very easy hack. unfortuntly it got overwritten when i upgraded, and now I'm trying to find out how to do it again. can't remember how!

japanforums.net
Registered User
Posts: 64
Joined: Tue Feb 24, 2004 2:19 am

Post by japanforums.net » Mon Mar 28, 2005 4:32 am

just found it

OPEN: lang_main.php

FIND: iso-8859-1

REPLACE WITH: utf-8

courtesy of Smartor

ptudozer
Registered User
Posts: 14
Joined: Fri Apr 29, 2005 9:11 am

It works

Post by ptudozer » Fri Apr 29, 2005 10:12 am

Man that was so simple that I couldn't believe it would work.
I tried to change all kinds of stuff to include the server side, and there it was.

THANK YOU

ScuL
Registered User
Posts: 111
Joined: Tue May 04, 2004 6:01 pm
Location: NZ

Post by ScuL » Fri Apr 29, 2005 1:21 pm

yes it works, but the old topics show in bad characters now..

test3r
Registered User
Posts: 4
Joined: Mon Apr 04, 2005 4:15 pm

Post by test3r » Fri Apr 29, 2005 2:26 pm

what i have to change to use utf-8?
I already change the lang_main.php file so that the letters seems to be displayed correctly. however, the search engine doesn't work fine. what I have to change?

ptudozer
Registered User
Posts: 14
Joined: Fri Apr 29, 2005 9:11 am

You're going to hate this

Post by ptudozer » Sat Apr 30, 2005 4:13 am

Well, let me see if I can explain this. I happened to figure it out by accident.
I currently run an English/Portuguese board. The problem was displaying the Portuguese characters. So I did what was mentioned above:
OPEN: lang_main.php

FIND: iso-8859-1

REPLACE WITH: utf-8

By the way it has to be done in both language file directories

But then all the Portuguese characters from the lang files would not show up correctly or at all.

Here are just some of the characters as an example:
à ç ê ã õ and so on...
You have to go into the LANG files for the language (this case Portuguese) and change all of them:
lang_admin.php
lang_bbcode.php
lang_faq.php
lang_main.php
Now as you look at these files you’ll see the word in English with the translation. Any characters like the ones mentioned above have to be replaced with Numerical Character References or NCR's. These take the form of &#nnnn;
See example below
á = á
ç = ç
ê = ê


I found this by opening the files in Dream weaver and then inserting "Special Characters" from the tool bar.

Now there are thousands of lines with these characters and it’s time consuming to get them all replaced, and finding them all. The best way I found was to make a list of all the characters (it helps if you are fluent in that language) and then using the replace function, systematically go thru every page and find/replace all the characters.
Here is an example of the word Forum, in Portuguese it’s Fórum. The ó would not show up, actually all I would see was the F
Now when you change the characters to NCR's it will look like this (in the PHP files) Fórum in the message board it shows correctly.

Now everything works, including the search engine. So good luck with your changes 8O
Last edited by ptudozer on Sun May 01, 2005 4:05 am, edited 1 time in total.
An expert is a person who has made all the mistakes that can be made in a very narrow field.
Niels Bohr --- Danish physicist (1885 - 1962)

saqibarzani
Registered User
Posts: 50
Joined: Thu Apr 21, 2005 3:36 am

subject/topic sections don't appear fine when using UTF-8

Post by saqibarzani » Sun May 01, 2005 3:47 am

Hi,
I am creating a new forum and having the same issue. I am trying to use Kurdish Language. I changed the code of all 4 language files you mentioned to UTF-8, but still the subject/topic section appears gibberish like this: کڵاوڕۆژنه‌ گۆ&#1....

Can someone please help me to fix this ? I appreciate your help.

Thanks

ptudozer
Registered User
Posts: 14
Joined: Fri Apr 29, 2005 9:11 am

Have you followed all the instructions?

Post by ptudozer » Sun May 01, 2005 4:04 am

Did you change all the special characters in the language files as mentioned above?

Another area to check is MYSQL database on server to see if MySQL connection collation is set to utf8_general_ci

If so then your problem is out of my very short helm of knowledge. I'm not a programmer and basically it's been a trial and error (lots of wasted hours) to figure some of this stuff out.

Good luck :lol:

saqibarzani
Registered User
Posts: 50
Joined: Thu Apr 21, 2005 3:36 am

Do you know where is this file ? and what to change ?

Post by saqibarzani » Mon May 02, 2005 3:58 am

Do you know where is this file ? and what to change ?

thanks

Locked

Return to “2.0.x Support Forum”