characters charset

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

Moderators: Lapo, Bax

Post Reply
Elgueu
Posts: 35
Joined: 23 May 2006, 22:45

characters charset

Post by Elgueu »

Hello everybody ! :P

As i am french, i would like to know if it is possible to set up the charset used in SFS, because i can't use some special characters like "é", "è" or "à" :o (i don't even know if you can see them ^^). They're always replaced by some "?".

Thank you ;)
User avatar
Lapo
Site Admin
Posts: 23438
Joined: 21 Mar 2005, 09:50
Location: Italy

Post by Lapo »

I think your problem is client side. We never had problems with those characters, and we've tested also many other foreign languages such as Thai, Chinese, Japanese, Russian, Greek, Hebrew etc...

Moreover we are from Italy and we use a lot of accented vowels (à,è,ì,ò,ù) but we don't get the problem you reported.

Are you sure you're embedding all the necessary fonts in your dynamic textfields?
Are you sure the fonts you are using support those characters?

Thanks
Lapo
--
gotoAndPlay()
...addicted to flash games
Elgueu
Posts: 35
Joined: 23 May 2006, 22:45

Post by Elgueu »

Well i'm just testing with the "TestChat" provided in the examples, and it doesn't work. I tried to change some textfiled fonts and embedded all the characters, it still doesn't work.

But when i look at the control panel, i see that :

Code: Select all

[Sending]: <msg t='sys'><body action='pubMsg' r='2'><txt><![CDATA[é]]></txt></body></msg>

[Received]: <msg t="sys"><body action="pubMsg" r="2"><user id="24" /><txt>?</txt></body></msg>
which make me think that i do send a "é", but the server send me back "?", and this may be not a client problem... Am i wrong ?



Oh, by the way, just an other question which has nothing to do with this problem : when i stay connected on a chat, without doing anything, i'm automatically disconnected after a while... Where does it come from ? How can i avoid that ?
Elgueu
Posts: 35
Joined: 23 May 2006, 22:45

Post by Elgueu »

Oh and i've just tested in the TheoChat, the "'é" characters is well displayed in the sender windows, but in the receiver windows it displays a "?". So it may not be a client probem, the server seems to convert the characters...
User avatar
Lapo
Site Admin
Posts: 23438
Joined: 21 Mar 2005, 09:50
Location: Italy

Post by Lapo »

it seems you're missing the UTF-8 support in the java virtual machine.
What OS do you use? What SFS version?
Lapo
--
gotoAndPlay()
...addicted to flash games
Elgueu
Posts: 35
Joined: 23 May 2006, 22:45

Post by Elgueu »

I have just the latest version (1.4.0), Pro. (the java machine is the one provided in the SFS pack, i didn't install anything).
The server is turning on Redhat Linux 7.2.
User avatar
Lapo
Site Admin
Posts: 23438
Joined: 21 Mar 2005, 09:50
Location: Italy

Post by Lapo »

Weird!... probably there's something going on with the underlying system and its support for UTF characters.

We've done a simple test, just to make sure:

- installed a fresh new Linux distro on a test machine ( Suse Linux 10. 0 )
- installed a fresh copy of SmartFoxServer 1.4.0 for Linux
- tested the advanced chat example.

Here's the result:

Code: Select all

[Sending]: <msg t='sys'><body action='pubMsg' r='2'><txt><![CDATA[à è é ì ò ù]]></txt></body></msg>

[Received]: <msg t="sys"><body action="pubMsg" r="2"><user id="0" /><txt>à è é ì ò ù</txt></body></msg>
As you can see, by default, it should work right out of the box :)

I will do some researches on the web to see if there's some well known problem with your Linux version
Lapo
--
gotoAndPlay()
...addicted to flash games
Elgueu
Posts: 35
Joined: 23 May 2006, 22:45

Post by Elgueu »

It's very kind of you
Thank you ;)

And SFS is just crazy, really :P
mangoon
Posts: 22
Joined: 18 Jul 2005, 02:36
Location: Vienna Austria
Contact:

Post by mangoon »

Hi,

Same problem here. Installed fresh mandriva 2006 and sfs 1.4.0 pro. If i start sfs service-like at runlevel3, it replaces the special chars with '?'.
If i start sfs at runlevel5 it deletes the complete string and sometimes just the special chars:

[Sending]: <msg t='sys'><body action='pubMsg' r='12'><txt><![CDATA[TestöäüÖÄÜtest]]></txt></body></msg>

[Received]: <msg t="sys"><body action="pubMsg" r="12"><user id="3" /><txt>Test��test</txt></body></msg>

I checked this on a 2nd testbox where all was fine with 1.3.0... installed 1.4.0 .... same behaviour as above.

I have no idea what causes this.. but try to find an answer :O)
mangoon
Posts: 22
Joined: 18 Jul 2005, 02:36
Location: Vienna Austria
Contact:

Post by mangoon »

Did some more tests ...

It is definately SFS 1.4.0 Using same machine (mandriva 10.1), same swf (newest flash api) on SFS 1.3.0 works as it should.
SFS 1.4.0 eats up all specialchars...

hope this helps a lil bit....
User avatar
Lapo
Site Admin
Posts: 23438
Joined: 21 Mar 2005, 09:50
Location: Italy

Post by Lapo »

Humm... interesting! :)
We've done a few more tests, trying to re-create the issue locally.
As I mentioned in an earlier post we did installed a fresh SUSE 10.0 and didn't find the problem.

We've tried a Mandriva 2006 and the problem was re-created, accented characters gave lots of problems.

mangoon: we tried both SFS 1.3.0 and 1.4.0 but we got the same exact issue. So I am wondering how it's possible that one was working and the other one no... in theory both should give problems.

CAUSE:
The explanation seems to be related with the JVM. As you may know the Linux version of SFS comes with an embedded JRE so that you don't need to setup your own in order to launch the server.
The embedded JRE is version 1.4.2_06 and it seemed to work fine an all Linux versions. Unfortunately it seems that on certain Linux distros it doesn't handle the UTF-8 characters correctly, as you have reported.

SOLUTION:
We simply downloaded the latest Java Runtime (version 1.5.0_06), installed it and the problem was gone 8)

Here's how you should proceed to update your SFS installation:

1) download and install the latest Java Runtime (for Linux) from www.java.com and install it

2) delete the current jre folder inside your installation directory:

Code: Select all

rm -rf yourPathToSmartFox/jre/
3) copy the new jre from its installation folder to the SFS installation folder

Code: Select all

cp -R /usr/java/jre1.5.0_06/ yourPathToSmartFox/
(usually java is installed in /usr/java)

4) Rename the just-copied folder to "jre"

Code: Select all

mv yourPathToSmartFox/jre1.5.0_06/ yourPathToSmartFox/jre/
5) Start the server

We'll soon repackage the Linux version of SFS with the updated JRE
Hope it helps :)
Lapo
--
gotoAndPlay()
...addicted to flash games
mangoon
Posts: 22
Joined: 18 Jul 2005, 02:36
Location: Vienna Austria
Contact:

Post by mangoon »

Yes, thank you. Works perfect now :O)

I installed the last java version, killed the old jre folder at sfs and replaced it with a symlink to the new version.

perfect support as always here...

btw, the reason for working on the other box with sfs 1.3.0 and not working with 1.4.0 is also clear now. starting via the start.sh script used my installed java version, which works right. The sfs script of the new version uses your java version.

thx 4 all that fine stuff,
mangoon
Elgueu
Posts: 35
Joined: 23 May 2006, 22:45

Post by Elgueu »

I'll try this solution as soon as i find a root admin =)
Thank you for your investigation :p
Elgueu
Posts: 35
Joined: 23 May 2006, 22:45

Post by Elgueu »

The solution works perfectly.
Thank you very much for this efficient support ! ;)
Pippoflash
Posts: 135
Joined: 30 Jan 2006, 17:16
Contact:

Post by Pippoflash »

I have the same issue with special characters.
I have substituted jre folder with jre6 folder and renamed it as jre, server doesn't start and prints this error:
Error: no `server' JVM at `C:\Program Files\SmartFoxServerPRO_1.6.6\jre\bin\server\jvm.dll'.

Win XP
SFS 1.6.9

thanks
-----------------------
www.pippoflash.com
-----------------------
Post Reply