The online racing simulator
InSim strings
(8 posts, started )
InSim strings
Hi,

I've been searching a lot but I can't find out how to convert strings received via InSim to human readable text in .NET.
I only get the some ASCII chars working, thats all.
I've been playing with Encoding.UFT8 but no luck yet.

Anyone who can help me?

Thanks,
Ron
Hello,

i am not sure that I understand what you mean. But try this

- Take source of LFSLapper
- Look at pakGetString in insim4.cs
- Look at codepage.cs. This convert LFS char to UTF8 char.

I hope this help you . If you use this code, you can, put only greeting on your source.

Gai-Luron
Quote from T-RonX :Hi,
I've been searching a lot but I can't find out how to convert strings received via InSim to human readable text in .NET.
I only get the some ASCII chars working, thats all.
I've been playing with Encoding.UFT8 but no luck yet.

LFS doesn't use UTF8 for encoding unfortunately, but code pages. And even code pages are not completely standard. So it's not easy task to make completely accurate conversion from and to c# internal UCS16 unicode representation.
Thank you very much Gai-Luron, that is exactly what I needed. Though it doesn't convert Chinese and Korean right?

I'm probably going to use this in an upcoming version of LFS External.
Hello,

I don't think it convert this two language. it's MonkOnHotTinRoof who make this module ( thank's for him ) and when he do it this language was not implemented in LFS. If you do modification in this file and add this languages, please send me the modified file

Bye

Gai-Luron


Probably you just need to add 2 codepages. But I am not sure, haven't looked how Scawen implemented stuff, maybe new alphabets need more bytes for one symbol...
Yes they do.

If I have some time left I might add those languages.

Thanks for the help all.

InSim strings
(8 posts, started )
FGED GREDG RDFGDR GSFDG