PreCompiled Win32 Pennmush binary and .po files ?

Posted by AnyKind on Fri 05 Mar 2004 09:25 PM — 13 posts, 48,930 views.

Belgium #0
Hi,

I wanted to know if there was a way to have pennmush work with .po files if i use precompiled win32 binaries.

Thx
Australia Forum Administrator #1
See Running PennMUSH under win32 with support for Scandinavian characters.
Belgium #2
Hmm already read the whole subject ...
but my problem isn't characters not showing ... but .po files not used while launching server.

I also tried to compile using cygwin ... there i succeed in using .po files but i had some problem with non standard characters even setting the good compression type and having LANG set to fr_FR (to use the fr_FR.po file).

Next i tried compiling with VC++ 6.0 ... and there ... compilation went fine but i got the same result as precompiled binaries ... no .po file aren't used.

I even tried setting environment variable LANG=fr_FR in windows system settings before copiling ... but that seems to be useless.

I'm really confused with that problem.

If anyone could give me a hint ...

Thx
Australia Forum Administrator #3
I'm not an expert on po files, having never used them, but it sounds like Cygwin is heading the way you want it to.

Now, given that the po part works, what is the problem with non-standard characters exactly?
Belgium #4
So when using cygwin i've the translated messages working.
I only have to do: "export LANG=fr_FR" before starting pennmush.

The probelm is then that i can't use any accent ...
for example:

if i type: think héhé
pennmush returns me: hh

if i type: @name here=éééé
pennmush returns me: give it what name ?

Some translated messages use accents and are well shown.
So i think it's a kind of non stantard ascii characters stripping. But i don't know how to get rid of that.

Translated message exemple showing properly:
La dernière connection venait de localhost le Thu Mar 04

In option.h i use this:
#define CRYPT_SYSTEM 0
#define MALLOC_PACKAGE 0
#define COMPRESSION_TYPE 4
Australia Forum Administrator #5
I have forwarded your problem to the PennMUSH maintainers, however I think there is a 1-line change you can make to allow those characters through. :)
Australia Forum Administrator #6
I have had this response from the PennMUSH developers:

Quote:

Actually, I think this is related to his client's locale. I don't have any such problem, for example, with MUSHclient or tf connecting to M*U*S*H, which is in the en_US locale (and can accept and display accented chars just fine).


I don't think you said which client you are using - perhaps that is the problem?
Belgium #7
I had the problem of client when i used Gmud ... i have Zmud which seems to be okay ... as it works normaly with precompiled version of pennmush (where i can't use .po files).
I also tried with mushclient today ... and i've still the same problem.

The only things that doesn't work are special char (é,à,è,ù,...) i send to the mush. The ones already set somewhere (like with .po files) are well shown.

So to be sure of hat i'm saying i tried running two pennmush at the same time ... the one on port 4201 using precompiled binaries without translation ... and the orther on port 4202 compiled with cygwin and with translations.

Using Mushclient with exactly the same settings for both but the port of connection i got this:

1) Precompiled binaries:
me ->@desc here=this room could perhaps use éé characters
mush ->testroom/DESCRIBE - Set.
me ->look
mush ->testroom(#35Rn)
mush ->this room could perhaps use éé characters

2) Cygwin compiled with translation:
me ->@desc here=this room could perhaps use éé characters
mush->testroom/DESCRIBE - OK..
me->look
mush->testroom(#7Rn)
mush->this room could perhaps use characters

With this test i'm absolutely sure my client isn't the cause. And so i think this could be some compilation and/or run option.
Australia Forum Administrator #8
Try this:

In bsd.c at line 3533 in my version (1.7.6 p14), in function process_input_helper are these line:


   } else if (p < pend && isprint(*q)) {
      *p++ = *q;


This is testing that only printable characters end up in the command buffer.

However this seems unnecessarily restrictive to me. It seems to be ruling out characters with the 8-bit set, and the test for IAC (0xFF) has already been done earlier.

I suggest a change to:


    } else if (p < pend && *q >= ' ' ) {
      *p++ = *q;

Belgium #9
Yes ... you did it :)
Now everthing seems to work fine.

Thank you a lot for your help.

#10
the isprint() function depends on the C implementation, and so on the platform. I tested it on a GNU/Linux with GlibC and it worked fine, but on a FreeBSD system, isprint didn't accept accents as printable characters...

#11
I just wanted to confirm that Nicks solution using:

"
} else if (p < pend && *q >= ' ' ) {
*p++ = *q;

"

worked perfect, at least for me. It helped me to finally get PennMush to receive/accept swedish characters like åäö when I sent them from my client (KildClient).

I'm using pennmush-1.8.3p6, compiled by myself, on Ubuntu Gutsy (linux) and all is well. =)


Thanks for the fix Nick!
Australia Forum Administrator #12
Glad it was helpful - the initial post was 4 years ago. :)