Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Messages & Shoutbox #12

Closed
Caberhagen opened this issue Dec 2, 2014 · 25 comments
Closed

Messages & Shoutbox #12

Caberhagen opened this issue Dec 2, 2014 · 25 comments

Comments

@Caberhagen
Copy link
Contributor

Hi

Found a problem on shoutbox and messages.
If the text have ä, ö and ü inside. The text are not showing. (not saved)

@kirirur
Copy link
Contributor

kirirur commented Dec 3, 2014

Hello,

if I recall correctly, this should be a server configuration problem, not a bug in the STFC code.

I've made a test on the following machine:

  • CentOS 6.6
  • Apache 2.2.15
  • mySQL 5.6.21
  • PHP 5.4.34

and you can see the result:

shoutbox

I'll made some other test on the other machine.

@Caberhagen
Copy link
Contributor Author

Hi

have you set in apache2 a default charset?

@kirirur
Copy link
Contributor

kirirur commented Dec 4, 2014

Hi,

I'm using the default Apache configuration that comes with CentOS 6.6, however searching for charset in /etc/httpd/conf/httpd.conf I've found this directive:

 AddDefaultCharset UTF-8

@Caberhagen
Copy link
Contributor Author

Hi

i set now in /etc/apache2/conf.d/charset the default to UTF-8
And is working.

@Caberhagen
Copy link
Contributor Author

Hi

after the fix i have som fault displayed portal news.

Bilder-Upload.eu - share DEINE Bilder

@kirirur
Copy link
Contributor

kirirur commented Dec 6, 2014

Hmmm, this could be an issue of the support center code.

However, it's the only point where umlauts aren't displayed correctly?

Please check everywhere in the game (messages, ships, auction and so on), so we can address the bug completely.

@Caberhagen
Copy link
Contributor Author

Ok i do it.

@Caberhagen
Copy link
Contributor Author

Hi
I see only in messages and shoutbox this problem.
On logs and others is all ok.

@kirirur
Copy link
Contributor

kirirur commented Dec 7, 2014

The shoutbox wasn't ok after you changed apache config?

@Caberhagen
Copy link
Contributor Author

On test with adddefaultcharset both are working. messages and shoutbox.
but portals news, logs any many others have then problems.

@kirirur
Copy link
Contributor

kirirur commented Dec 7, 2014

Hmm, I think the "bug" isn't in the shoutbox but in the other part of the code. Charset should be UTF-8, it's almost the standard now.

Update, this is hard to reproduce, on my machine:

  • CentOS 6.6
  • Apache 2.2.15
  • PHP 5.5.19
  • mySQL 5.6.22

everything works fine. I've tested characters with umlauts on:

  • headquarter
  • spacedock
  • trade center
  • fleets
  • alliance (found another bug with mySQL 5.5+ here)
  • messages
  • settings
  • portal news
  • portal shoutbox

without any problems.

@Caberhagen
Copy link
Contributor Author

Is a strange thig.
I found in a lot of files in meta charset iso
but i look deeper in to it after all other stuff is full working.

@kirirur
Copy link
Contributor

kirirur commented Dec 11, 2014

Do you mean in the HTML code generated by the game?

Let me know if changing it could solve the issue.

@Caberhagen
Copy link
Contributor Author

You can see it on UI/index.php line 104.
and many others have this setting.
I make some work to track down this problem.
but not the highest prioriti in the mom.
feedback will come...

@kirirur
Copy link
Contributor

kirirur commented Dec 12, 2014

Hello,

I see, maybe it should be changed to UTF-8?

Besides I've found a couple a lines below another little bug, content language should be variable depending upon the language detected by the browser.

@Caberhagen
Copy link
Contributor Author

Nice Picture!

@kirirur
Copy link
Contributor

kirirur commented Dec 14, 2014

Hello,

which race does show that characters?

@Caberhagen
Copy link
Contributor Author

Hi

Race are federation
Ui lang is german.

@kirirur
Copy link
Contributor

kirirur commented Dec 18, 2014

Hello,

Federation? I was pretty sure all the umlauts where translated with the corresponding HTML code.

Update: I've made some research, I was remembering correctly: umlauts in federation race are all translated into HTML code. There is for sure a bug between lines 458-497 in module researchlabs.PHP when it try to truncate names longer then 18 chars.

@kirirur
Copy link
Contributor

kirirur commented Dec 18, 2014

Hello,

I should have found a solution, try to change line 465 in researchlabs.php from:

$compname=substr($tmp,0,16);

to:

$compname=htmlentities(substr($tmp,0,16));

It should works as expected, let me know if it works for you.

@Caberhagen
Copy link
Contributor Author

Hi

i found the way to use umlauts.
On a open php5 system with no default charset config, php use the charset from the php files.
so we have to change all the settings in the php files to utf-8 or set in php.ini to default utf-8.

@kirirur
Copy link
Contributor

kirirur commented Dec 30, 2014

Hi,

If you're running only STFC, probably the second solution is the easier. :) However I think umlauts should be translated in HTML counterparts.

@Caberhagen
Copy link
Contributor Author

Hi

yes i using the php.ini way. but i look in to it to change the meta of the files to utf-8 if i have time...

@kirirur
Copy link
Contributor

kirirur commented Dec 31, 2014

OK,

let me know any further development.

@kirirur
Copy link
Contributor

kirirur commented Aug 20, 2015

Hello @Caberhagen can we consider closed this issue?

Thank you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants