Swedish letters in config.xml?

Need help with SmartFoxServer? You didn't find an answer in our documentation? Please, post your questions here!

Moderators: Lapo, Bax

Danneman
Posts: 33
Joined: 03 Apr 2005, 17:10
Location: Sweden

Swedish letters in config.xml?

Postby Danneman » 21 Jun 2008, 10:30

Hi!

Im using SmartFoxServer 1.1.1., and I want to use swedish letters in the config.xml-file.

For instance:
--------------
config.xml:

<Zones>
<Zone name="simpleChat" uCountUpdate="true" buddyList="20">
<Rooms>
<Room name="Lobby" maxUsers="19" isPrivate="false" isTemp="false" autoJoin="true" >
<Vars>

<Var name="rV_PowerPoint" type="s" persistent="false" private="false">Hallå</Var>

etc.

-------------------

On the last line, there is the letter "Ã¥". But it only gets registered as "null" in the admin-panel, and does not show at all when using it in my chat-client (its for a black-board of sorts).

Is there a way around this, since its crucial for my application?
User avatar
potmo
Posts: 154
Joined: 02 Feb 2007, 14:28
Location: Stockholm Sweden
Contact:

Postby potmo » 23 Jun 2008, 06:09

have you saved the xml as UTF-8 and do you have a UTF-8 encoding tag at the top of the xml?
Nisse Bergman
Raketspel
Danneman
Posts: 33
Joined: 03 Apr 2005, 17:10
Location: Sweden

Postby Danneman » 23 Jun 2008, 14:32

Yes, the topmost line in the config.xml is this:

<?xml version="1.0" encoding="UTF-8" standalone="no"?>
User avatar
Lapo
Site Admin
Posts: 23007
Joined: 21 Mar 2005, 09:50
Location: Italy

Postby Lapo » 23 Jun 2008, 19:52

Is the config file saved in UTF-8?
Can you double check?
Lapo
--
gotoAndPlay()
...addicted to flash games
Danneman
Posts: 33
Joined: 03 Apr 2005, 17:10
Location: Sweden

Postby Danneman » 23 Jun 2008, 20:59

Oh, ok, I just assumed it was saved in UTF-8 since UTF-8 was stated in the first xml-line :P

No, apparently I had saved it from Flash using "Default Encoding".

I tried saving it as "UTF-8", but now ended up with another problem:
the server does not start correctly :shock:

The error-message is:
Problems in config file: Invalid input: `´[some strange symbols] <0xfeff>, SystemID=´file:.´, Line=1

But saving it as "Default Encoding" works fine, though.

Any ideas?
User avatar
BigFIsh
Posts: 1698
Joined: 25 Feb 2008, 19:26
Location: New Zealand

Postby BigFIsh » 23 Jun 2008, 21:19

Try replace å with &aring; or &# 229; (without spaces)
Danneman
Posts: 33
Joined: 03 Apr 2005, 17:10
Location: Sweden

Postby Danneman » 23 Jun 2008, 21:52

BigFIsh wrote:Try replace å with &aring; or &# 229; (without spaces)


Ive tried this solution, but it does not work at all :/
User avatar
Lapo
Site Admin
Posts: 23007
Joined: 21 Mar 2005, 09:50
Location: Italy

Postby Lapo » 24 Jun 2008, 06:30

I've tested using your character and there's no problem using UTF-8.
See below. I would suggest that you use a text editor that allow checking/editing the file format (e.g. Notepad++ under Windows, TextMate for OSX)

Image
Lapo

--

gotoAndPlay()

...addicted to flash games
Danneman
Posts: 33
Joined: 03 Apr 2005, 17:10
Location: Sweden

Postby Danneman » 24 Jun 2008, 11:16

I tried Notepad++. Great editor, btw.

I saved the config.xml as UTF-8, and I got the problem described above.
Could it be that some sort of (invisible to the texteditors) character has inserted itself at the beginning of the file, since it says something like "invalid character at line 1"?

When saving as UTF-8 (without BOM) the config.xml-file worked, but still replaced swedish characters with null.
User avatar
Lapo
Site Admin
Posts: 23007
Joined: 21 Mar 2005, 09:50
Location: Italy

Postby Lapo » 24 Jun 2008, 12:21

very strange... send us the cfg file via email, we'll take a look.
Lapo

--

gotoAndPlay()

...addicted to flash games
Danneman
Posts: 33
Joined: 03 Apr 2005, 17:10
Location: Sweden

Postby Danneman » 24 Jun 2008, 13:55

Ok, Ive sent it to info @ smartfoxserver . com.
Danneman
Posts: 33
Joined: 03 Apr 2005, 17:10
Location: Sweden

Postby Danneman » 24 Jun 2008, 21:09

ive sent another mail with an image of the error-message with the same config.xml.
patso
Posts: 380
Joined: 13 Nov 2006, 13:44
Location: Sofia, Bulgaria

Postby patso » 25 Jun 2008, 18:10

Maybe it's that bug with the UTF-8 characters. It was fixed in one of the version - don't remember which one. Maybe does not present in 1.1.1 but just in case to mention about it :)
patso
Posts: 380
Joined: 13 Nov 2006, 13:44
Location: Sofia, Bulgaria

Postby patso » 26 Jun 2008, 06:21

Actually the bug I was talking about in the previous post is not related to the UTF-8 so please just ignore what I've said. I need a memory upgrade :)

Return to “SmartFoxServer 1.x Discussions and Help”

Who is online

Users browsing this forum: No registered users and 40 guests