DragonPrime - LoGD Resource Community
Welcome Guest
  • Good afternoon, Guest.
    Please log in, or register.
  • April 25, 2018, 01:04:02 PM
Home Forums News Downloads Login Register Advanced Search
* * *
DragonPrime Menu
Login
 
 
Resource Pages
Search

Pages: [1]   Go Down
  Print  
Author Topic: Russian letters support in game  (Read 3662 times)
0 Members and 1 Guest are viewing this topic.
vt13
Guest
« on: February 17, 2005, 12:59:07 AM »

Hi i'm new here, but i played Lord game since it was BBS door game  Smiley

I decided to make my own server, but i want to translate it in Russian language.
I tried to do this, (editing php files / translator tool)
- there is one problem:
all russian letters in game shown with strange symbols like ()

(everything is ok in sql database)

Logged
enderwiggin
Guest
« Reply #1 on: February 17, 2005, 01:06:07 AM »

Welcome to Dragonprime!

As a native English speaker, I rarely run into situations like this, so I'm not entirely sure, but can't you just put in an HTML command to force a specific character set?

http://www.w3.org/TR/REC-html40/charset.html
Logged
XChrisX
Global Moderator
Mod God
*****
Offline Offline

Posts: 4647

Be aware of the squirrel!


View Profile WWW
« Reply #2 on: February 17, 2005, 01:15:38 AM »

Dobroi den Wink

I think enderwiggins suggestion could help...

You'd have to edit the template files (would be the easiest way..)...

ISO-8859-5 or Windows-1251 should work... (the last one perhaps not on all systems Wink )
Logged

Running for more than three years now:
sixf00t4
Mod God
*****
Offline Offline

Posts: 1916



View Profile WWW
« Reply #3 on: February 17, 2005, 01:54:44 AM »

there was a topic about japanese translation not working...
Logged

vt13
Guest
« Reply #4 on: February 17, 2005, 02:48:25 AM »

I tried to put
<meta http-equiv='Content-Type' content='text/html; charset=windows-1251'>
in template file, but there is still problem with russian letters.

But - if i put russian text in template file - it works OK !

So i think there must be something in LOTGD php code - that changes russian letters to some other symbols  Huh

By the way - thanks for fast reply`s !  Grin


Logged
sixf00t4
Mod God
*****
Offline Offline

Posts: 1916



View Profile WWW
« Reply #5 on: February 17, 2005, 03:36:03 AM »

http://dragonprime.net/index.php?board=16;action=display;threadid=637;start=msg4726#msg4726

this thread might help, still can't find that japanese one.
Logged

Kendaer
Guest
« Reply #6 on: February 17, 2005, 06:56:18 AM »

The funky characters are UTF-8 encoded characters.

You need to specify your character encoding as UTF-8 rather than windows-1251.

Logged
vt13
Guest
« Reply #7 on: February 17, 2005, 07:40:49 AM »

Now i'm trying with UTF-8 encoding

It's working if i put russian characters in theme file

If i change text in for example home.php - there are problems:

i put &#1071; in home.php, but it is displayed as &amp;#1071; (in page source)
LOTGD seems to put amp; there
Is it possible to get rid of amp; ?

 Smiley




Logged
Hidehisa
Guest
« Reply #8 on: February 17, 2005, 08:24:55 PM »

This might be the same problem I met when trying to make LotGD run in Japanese.

You might need to make all htmlentities function called with 2nd and 3rd parameter.
htmlentities

If you don't specify character set with 3rd parameter, htmlentities assumes characterset is latin1 and convert all high-ascii character to HTML entities like "&foo;&bar;".

I made a wrapper function html_entities_wrapper() in common.php and replaced all "htmlentities" to "html_entities_wrapper" in all php files.

And append some HTML meta tag then it should be OK.
Logged
vt13
Guest
« Reply #9 on: February 18, 2005, 12:22:26 AM »

Thanks for idea!  Cheesy

I'll try to do some experiments, but i'm not very good at php  Roll Eyes

Logged
Kendaer
Guest
« Reply #10 on: February 18, 2005, 12:40:19 AM »

Please note, not all versons of PHP will support that syntax, (the third argument was added in PHP 4.1.0) which is why this was not added to the core.

Even more importantly, support for the Russian Charset (KOI8-R) was not added until 4.3.2 which is relatively recent.

This means that there is a very high likelihood that you will not be able to get this to work for Russian without updating your version of PHP.

Sorry that we cannot support this better, but.. that's the fact of the world.
« Last Edit: February 18, 2005, 12:43:15 AM by Kendaer » Logged
Pages: [1]   Go Up
  Print  
 
Jump to:  


*
DragonPrime Notices
Play LoGD on Dragonprime

Support Us
No funds raised yet this year
Your help is greatly appreciated!
Recent Topics
DragonPrime LoGD
Who's Online
39 Guests, 0 Users
Home Forums News Downloads Login Register Advanced Search