problem with åäö in Xaseco 1.05/6

Discuss everything about Xymph's Aseco flavoured server control scripts for TM Forever / classic TMN and for TM² Canyon.

Moderators: Xymph, TM-Patrol

User avatar
lgrfbs-sweden
smooth traffic navigator
smooth traffic navigator
Posts: 200
Joined: 15 Apr 2007 15:48
Owned TM-games: TMN
Location: Sweden
Contact:

problem with åäö in Xaseco 1.05/6

Post by lgrfbs-sweden » 25 Mar 2009 20:18

Hi all
I try to upgrade me server from aseco 0.91 to Xaseco 1.05 & 1.06 but I get some problems with it.

*A, I can not use "åäö" in <welcome> tag in file: config.xml then I run Xaseco 1.05 & 1.06 but in Aseco 0.91 is it not problem at all.

*B, The ">> New Player: DenniZ Nation: SWE Ladder: 0 Server: None" and ">> DenniZ has left the game" do not show up in Xaseco 1.05 & 1.06.

The server is a TMN system.

How shall I do for solve this problems?
Admin On:Image
My server:lgrfbs server / XASECO plugins
Image

User avatar
lgrfbs-sweden
smooth traffic navigator
smooth traffic navigator
Posts: 200
Joined: 15 Apr 2007 15:48
Owned TM-games: TMN
Location: Sweden
Contact:

Re: problem with åäö in Xaseco 1.05/6

Post by lgrfbs-sweden » 05 Apr 2009 11:23

Is it nobody other as heveing this problem with no ANSI charters in Welcome tag?
Admin On:Image
My server:lgrfbs server / XASECO plugins
Image

User avatar
lille79
Pit Crew
Pit Crew
Posts: 881
Joined: 09 Dec 2007 15:04
Owned TM-games: TMN, TMNF, TMUF
Location: Norway
Contact:

Re: problem with åäö in Xaseco 1.05/6

Post by lille79 » 05 Apr 2009 11:57

Well, I have never gotten æ, ø and å to function in any Xaseco I think :(
Don't know a solution...
/lille79
Old man of the Norwegian Trackmania team Super Sheep Racing
To visit my homepage/blog, and download the usbTMFserver, this is the place to go.

dragu
wheelbarrow operator
wheelbarrow operator
Posts: 19
Joined: 24 Nov 2006 21:44
Owned TM-games: TMN
Location: Sweden
Contact:

Re: problem with åäö in Xaseco 1.05/6

Post by dragu » 12 Apr 2009 16:28

*caughs and cracks my fingers some*

Well after having been sitting and talking with my brother (lgrfbs) on the phone for some time an old memory surfaced
that we had managed to succeed with getting "åäö" / special characters to work in aseco 0.91.
But at the same time we were trying to get it to work in remoteCP as well. Anyhow, after having gone thru
the code inside aseco.php from 0.91 and comparing it with the original it was one little piece that sticked out.
So when we tried this with the TMF version (1.06), it showed that it was precisly that bit which was missing.


Posting two bits of code, the first one is the original in the aseco.php file. (Aseco 1.06).
The second code bit, is the small change which was done to allow special characters to be used in the welcome text.

Code: Select all

	// send welcome popup or chat message
	if ($this->settings['welcome_msg_window']) {
		if ($this->server-getGame() == 'TMF')
			$message = str_replace('{#highlite}', '{#message}', $message);
			$message = split('{br}', $this->formatColors($message));
			foreach ($message as &$line)
				$line = array($line);
			display_manialink($player_item->login, '',
				array('Icons64x64_1', 'Inbox'), $message,
				array(1.2), 'OK');
		} else { // TMN
			$message = str_replace('{br}', LF, $this->formatColors($message));
			$this->client->query('SendDisplayServerMessageToLogin', $player_item->login, $message, 'OK', '', 0);
		}
	} else {
		$message = str_replace('{br}', LF, $this->formatColors($message);
		$this->client->query('ChatSendServerMessageToLogin', str_replace(LF . LF, LF, $message), $player_item->login);
	}

Code: Select all

	// send welcome popup or chat message
	if ($this->settings['welcome_msg_window']) {
		if ($this->server-getGame() == 'TMF')
			$message = utf8_encode(str_replace('{#highlite}', '{#message}', $message));
			$message = split('{br}', $this->formatColors($message));
			foreach ($message as &$line)
				$line = array($line);
			display_manialink($player_item->login, '',
				array('Icons64x64_1', 'Inbox'), $message,
				array(1.2), 'OK');
		} else { // TMN
			$message = utf8_encode(str_replace('{br}', LF, $this->formatColors($message)));
			$this->client->query('SendDisplayServerMessageToLogin', $player_item->login, $message, 'OK', '', 0);
		}
	} else {
		$message = utf8_encode(str_replace('{br}', LF, $this->formatColors($message));
		$this->client->query('ChatSendServerMessageToLogin', str_replace(LF . LF, LF, $message), $player_item->login);
	}
Anyhow, that's it. Time to let the brain go and relax.
Image
Image

Xymph
Pit Crew
Pit Crew
Posts: 5650
Joined: 19 Aug 2007 12:58
Owned TM-games: TMN, TMU, TMF, TM²
Contact:

Re: problem with åäö in Xaseco 1.05/6

Post by Xymph » 12 Apr 2009 20:24

Nice catch, will be in the next release. Thanks. :thumbsup:
Developer of XASECO for TMF/TMN ESWC & XASECO2 for TM²: see XAseco.org
Find your way around the Mania community from the TMN ESWC hub, TMF hub, TM² hub, and SM hub

User avatar
lille79
Pit Crew
Pit Crew
Posts: 881
Joined: 09 Dec 2007 15:04
Owned TM-games: TMN, TMNF, TMUF
Location: Norway
Contact:

Re: problem with åäö in Xaseco 1.05/6

Post by lille79 » 21 May 2009 16:09

@lgrfbs: is it working in 1.08?

Xaseco won't start with ö, æ, ø, å in config.xml startup-message. Haven't tested it in 1.08 until now.
/lille79
Old man of the Norwegian Trackmania team Super Sheep Racing
To visit my homepage/blog, and download the usbTMFserver, this is the place to go.

Xymph
Pit Crew
Pit Crew
Posts: 5650
Joined: 19 Aug 2007 12:58
Owned TM-games: TMN, TMU, TMF, TM²
Contact:

Re: problem with åäö in Xaseco 1.05/6

Post by Xymph » 21 May 2009 17:38

lille79 wrote:@lgrfbs: is it working in 1.08?

Xaseco won't start with ö, æ, ø, å in config.xml startup-message. Haven't tested it in 1.08 until now.
viewtopic.php?p=153165#p153165
viewtopic.php?p=153652#p153652
Developer of XASECO for TMF/TMN ESWC & XASECO2 for TM²: see XAseco.org
Find your way around the Mania community from the TMN ESWC hub, TMF hub, TM² hub, and SM hub

User avatar
lille79
Pit Crew
Pit Crew
Posts: 881
Joined: 09 Dec 2007 15:04
Owned TM-games: TMN, TMNF, TMUF
Location: Norway
Contact:

Re: problem with åäö in Xaseco 1.05/6

Post by lille79 » 21 May 2009 18:36

It hasn't worked in all previous releases, so I thought that was changed in 1.08 to make it work. A little confused by this, but ok :) I'll look more into it.

edit: no, æ, ø and å (or åäö for that matter) doesn't work in 1.08 with or without the utf-8-changes. (atleast what I could find)
/lille79
Old man of the Norwegian Trackmania team Super Sheep Racing
To visit my homepage/blog, and download the usbTMFserver, this is the place to go.

Xymph
Pit Crew
Pit Crew
Posts: 5650
Joined: 19 Aug 2007 12:58
Owned TM-games: TMN, TMU, TMF, TM²
Contact:

Re: problem with åäö in Xaseco 1.05/6

Post by Xymph » 21 May 2009 20:50

lille79 wrote:It hasn't worked in all previous releases, so I thought that was changed in 1.08 to make it work. A little confused by this, but ok :) I'll look more into it.

edit: no, æ, ø and å (or åäö for that matter) doesn't work in 1.08 with or without the utf-8-changes. (atleast what I could find)
They display for me on both classic TMN and TMF when using the utf8_encode calls. I don't know why on some other servers they shouldn't be encoded, let alone why it doesn't work for you in either case. Maybe you're doing something wrong, but please let me know if you find out what does work.

PS. Surely you're not putting them into <startup>? This is and has always been about accented characters in <welcome> and only <welcome>...
Developer of XASECO for TMF/TMN ESWC & XASECO2 for TM²: see XAseco.org
Find your way around the Mania community from the TMN ESWC hub, TMF hub, TM² hub, and SM hub

User avatar
lille79
Pit Crew
Pit Crew
Posts: 881
Joined: 09 Dec 2007 15:04
Owned TM-games: TMN, TMNF, TMUF
Location: Norway
Contact:

Re: problem with åäö in Xaseco 1.05/6

Post by lille79 » 22 May 2009 10:20

It's in the <welcome>-message in config.xml :) (Don't know why I said startup ;) )
When inserting this character in any welcome-message

Code: Select all

ø
I get this result:

Code: Select all

[XAseco] PHP Version is 5.2.4 on WINNT
[XAseco] Load settings [config.xml]
[XASECO Warning] [XML Error 9] Invalid character on line 39
[XASECO Fatal Error] Could not read/parse config file config.xml ! on line 416 in file D:\Temp\usbTMFserver_v2.6\TMF\control\xaseco_3\aseco.php
Can it be something with the web-server?
/lille79
Old man of the Norwegian Trackmania team Super Sheep Racing
To visit my homepage/blog, and download the usbTMFserver, this is the place to go.

Xymph
Pit Crew
Pit Crew
Posts: 5650
Joined: 19 Aug 2007 12:58
Owned TM-games: TMN, TMU, TMF, TM²
Contact:

Re: problem with åäö in Xaseco 1.05/6

Post by Xymph » 22 May 2009 11:10

lille79 wrote:It's in the <welcome>-message in config.xml :) (Don't know why I said startup ;) )
Phew. :wink:
lille79 wrote:When inserting this character in any welcome-message

Code: Select all

ø
I get this result:

Code: Select all

[XAseco] PHP Version is 5.2.4 on WINNT
[XAseco] Load settings [config.xml]
[XASECO Warning] [XML Error 9] Invalid character on line 39
[XASECO Fatal Error] Could not read/parse config file config.xml ! on line 416 in file D:\Temp\usbTMFserver_v2.6\TMF\control\xaseco_3\aseco.php
Can it be something with the web-server?
XAseco just tries to load that config file, it doesn't do anything with any webserver. That character works fine on my server, so I still have no idea why it errors out on yours. The .xml file is declared to be UTF-8 though, so maybe you're inserting the non-ASCII characters with an editor that doesn't support that character set?
Developer of XASECO for TMF/TMN ESWC & XASECO2 for TM²: see XAseco.org
Find your way around the Mania community from the TMN ESWC hub, TMF hub, TM² hub, and SM hub

User avatar
lille79
Pit Crew
Pit Crew
Posts: 881
Joined: 09 Dec 2007 15:04
Owned TM-games: TMN, TMNF, TMUF
Location: Norway
Contact:

Re: problem with åäö in Xaseco 1.05/6

Post by lille79 » 22 May 2009 12:13

Microsoft ****** lol

I'll never use Wordpad again. Thanks Xymph. Downloaded notepad++ and set the format to "Encode in UTF-8" when typing in the text. That worked. :D
/lille79
Old man of the Norwegian Trackmania team Super Sheep Racing
To visit my homepage/blog, and download the usbTMFserver, this is the place to go.

Assembler Maniac
Pit Crew
Pit Crew
Posts: 1493
Joined: 03 Jun 2006 13:24
Owned TM-games: TMU
Contact:

Re: problem with åäö in Xaseco 1.05/6

Post by Assembler Maniac » 22 May 2009 12:17

lille79 wrote:Microsoft ****** lol

I'll never use Wordpad again. Thanks Xymph. Downloaded notepad++ and set the format to "Encode in UTF-8" when typing in the text. That worked. :D
Try using FoxE, http://www.firstobject.com/dn_editor.htm

It's a really nice XML editor.

User avatar
lille79
Pit Crew
Pit Crew
Posts: 881
Joined: 09 Dec 2007 15:04
Owned TM-games: TMN, TMNF, TMUF
Location: Norway
Contact:

Re: problem with åäö in Xaseco 1.05/6

Post by lille79 » 22 May 2009 14:44

off topic, but do you know of a good file comparison-application for Windows too?
/lille79
Old man of the Norwegian Trackmania team Super Sheep Racing
To visit my homepage/blog, and download the usbTMFserver, this is the place to go.

Assembler Maniac
Pit Crew
Pit Crew
Posts: 1493
Joined: 03 Jun 2006 13:24
Owned TM-games: TMU
Contact:

Re: problem with åäö in Xaseco 1.05/6

Post by Assembler Maniac » 22 May 2009 15:59

lille79 wrote:off topic, but do you know of a good file comparison-application for Windows too?
WinDiff?

I use Beyond Compare because it came with my editor (dunno what it costs separate, but it isn't free). Does a really nice job of syncing between files, even where there are lots of differences between the files.

Post Reply