Can any body add Russian encoding to WZ?
Can any body add Russian encoding to WZ?
We on the www.krossfire.net.ru want to create russian transtalions of WZ 2100, but 2.0.6 do not undarstend russian keyboard, this makes imposible to create russian chat in multyplayer...
Any body can HELP???
Any body can HELP???
- lav_coyote25
- Professional
- Posts: 3434
- Joined: 08 Aug 2006, 23:18
Re: Can any body add Russian encoding to WZ?
there was talk of this happening... i do not know what the status is at this time... your best bet is to ask one of the devs...
"to prepare for disaster is to invite it, to not prepare for disaster is a fools choice" -me (kim-lav_coyote25-metcalfe) - it used to be attributed to unknown - but adding the last bit , it now makes sense.
- DevUrandom
- Regular
- Posts: 1690
- Joined: 31 Jul 2006, 23:14
Re: Can any body add Russian encoding to WZ?
There was a patch to make 8bit codes work. For iso8859-1 at least it seems to work...
Re: Can any body add Russian encoding to WZ?
I think that instead we should eventually move over to Unicode with UTF-8 encoding since ISO8869-1 (aka Latin-1) is only good for most European languages really.
I was thinking that we maybe would have to use some font rasterisation system as well for this (since storing a bitmap with characters isn't the best option really). I was personally thinking about using GNU Unifont for this.
I was thinking that we maybe would have to use some font rasterisation system as well for this (since storing a bitmap with characters isn't the best option really). I was personally thinking about using GNU Unifont for this.
"First make sure it works good, only then make it look good." -- Giel
Want to tip/donate? bitcoin:1EaqP4ZPMvUffazTxm7stoduhprzeabeFh
Want to tip/donate? bitcoin:1EaqP4ZPMvUffazTxm7stoduhprzeabeFh
- DevUrandom
- Regular
- Posts: 1690
- Joined: 31 Jul 2006, 23:14
Re: Can any body add Russian encoding to WZ?
Problem here is that no function in WZ is currently able to handle UTF8. And yes, the fonts would have to be adapted, too. Textured fonts wont work. So a GL TrueType renderer is needed.Giel wrote: I think that instead we should eventually move over to Unicode with UTF-8 encoding since ISO8869-1 (aka Latin-1) is only good for most European languages really.
I was thinking that we maybe would have to use some font rasterisation system as well for this (since storing a bitmap with characters isn't the best option really). I was personally thinking about using GNU Unifont for this.
Re: Can any body add Russian encoding to WZ?
The only functions that would have to be able to deal with UTF-8 encoding are the display functions and the input functions. ASCII text won't change if encoded in UTF-8. I can easily write up a UTF-8 encoder and decoder (if not less) in about 30 minutes. The real "problem" is the rendering font though. (Also I wouldn't know where to start to take cyrillian characters from a keyboard).DevUrandom wrote: Problem here is that no function in WZ is currently able to handle UTF8.
Anyway I'll write some UTF-8 encoding/decoding code tomorrow
Maybe use FreeType to rasterize all used characters of a font ? Then use GNU Unifont as our font (it has _lots_ of characters).DevUrandom wrote: And yes, the fonts would have to be adapted, too. Textured fonts wont work. So a GL TrueType renderer is needed.
"First make sure it works good, only then make it look good." -- Giel
Want to tip/donate? bitcoin:1EaqP4ZPMvUffazTxm7stoduhprzeabeFh
Want to tip/donate? bitcoin:1EaqP4ZPMvUffazTxm7stoduhprzeabeFh
- DevUrandom
- Regular
- Posts: 1690
- Joined: 31 Jul 2006, 23:14
Re: Can any body add Russian encoding to WZ?
You mean this one? http://czyborra.com/
[me=DevUrandom]throws DejaVu in: http://dejavu.sourceforge.net/ (Used by Wesnoth)[/me]
I think we also need to make sure the underlying layers support it. And I know this is not true for PhysFS-1.0: "1.1 only: Fully supports Unicode filenames."
So we may need to bundle one or the other package.
What I wonder as well is whether we need to increase buffer lengths. Eg. Linux's PATH_MAX (which we use to define Windows style MAX_PATH) is long enough with 4096 bytes. But poor Windows has this set a lot smaller, afaik. There are also input buffers and the like. Maybe we need to use Windows Unicode functions (*W) in some places.
Not that this is an issue, but it could turn out to be a little more complex than we initialy think.
[me=DevUrandom]throws DejaVu in: http://dejavu.sourceforge.net/ (Used by Wesnoth)[/me]
I think we also need to make sure the underlying layers support it. And I know this is not true for PhysFS-1.0: "1.1 only: Fully supports Unicode filenames."
So we may need to bundle one or the other package.
What I wonder as well is whether we need to increase buffer lengths. Eg. Linux's PATH_MAX (which we use to define Windows style MAX_PATH) is long enough with 4096 bytes. But poor Windows has this set a lot smaller, afaik. There are also input buffers and the like. Maybe we need to use Windows Unicode functions (*W) in some places.
Not that this is an issue, but it could turn out to be a little more complex than we initialy think.
Last edited by DevUrandom on 30 Jul 2007, 11:58, edited 1 time in total.
Re: Can any body add Russian encoding to WZ?
yes, quite specifically I mean this: http://czyborra.com/unifont/DevUrandom wrote: You mean this one? http://czyborra.com/
GLT (a C++ wrapper for OpenGL) has some tutorials where this font is used to render different texts.
This seems like a nice font as well. I especially like the monospace, sans serif variant of it.DevUrandom wrote: [me=DevUrandom]throws DejaVu in: http://dejavu.sourceforge.net/ (Used by Wesnoth)[/me]
DevUrandom wrote: I think we also need to make sure the underlying layers support it. And I know this is not true for PhysFS-1.0: "1.1 only: Fully supports Unicode filenames."
So we may need to bundle one or the other package.
Dang, I'd very much like the idea of using C++'s std::string here.DevUrandom wrote: What I wonder as well is whether we need to increase buffer lengths. Eg. Linux's PATH_MAX (which we use to define Windows style MAX_PATH) is long enough with 4096 bytes. But poor Windows has this set a lot smaller, afaik. There are also input buffers and the like.
Well I do _not_ want to use Windows' Unicode functions if at all possible, firstly these use UTF-16 (little endian variant), secondly they're a pain to work with. So internally I would really want to use UTF-8 instead, plus AFAIK we hardly ever call WinAPI functions, so lets keep it that way.DevUrandom wrote: Maybe we need to use Windows Unicode functions (*W) in some places.
Not that this is an issue, but it could turn out to be a little more complex than we initialy think.
"First make sure it works good, only then make it look good." -- Giel
Want to tip/donate? bitcoin:1EaqP4ZPMvUffazTxm7stoduhprzeabeFh
Want to tip/donate? bitcoin:1EaqP4ZPMvUffazTxm7stoduhprzeabeFh
- mcdebugger
- Trained
- Posts: 66
- Joined: 02 Feb 2007, 20:54
- Location: Russian Federation
- Contact:
Re: Can any body add Russian encoding to WZ?
I think it lives only because of Windows OS. A UTF support would be better for a "world issue" It's just my subjective opinion...Speeder wrote: russian encoding is cp-1251
Hardware: MacBook Pro 13 2015
Software: macOS 10.15 Catalina
Software: macOS 10.15 Catalina
- DevUrandom
- Regular
- Posts: 1690
- Joined: 31 Jul 2006, 23:14
Re: Can any body add Russian encoding to WZ?
Coming nearer with the recent addition of unicode font rendering by Giel.
Gettext also supports utf-8, so if I am not mistaken the "only" part which needs checking is Warzone's internals. (Don't get me wrong, this is still nothing which can be done in 5 minutes...)
Gettext also supports utf-8, so if I am not mistaken the "only" part which needs checking is Warzone's internals. (Don't get me wrong, this is still nothing which can be done in 5 minutes...)