DimonSE / open9x

Automatically exported from code.google.com/p/open9x
0 stars 0 forks source link

Encoder / Decoder #10

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
The character encoder/decoder is appended.
Tested and functioning on Linux. Highly uncertain if it would work in Windows 
(I am almost sure that it will not work, but who knows).
The executables are compiled in Ubuntu. Should run on other flavors to, I guess.

Original issue reported on code.google.com by kjell.kernen on 3 Mar 2012 at 10:58

Attachments:

GoogleCodeExporter commented 9 years ago
Do you mean that for Swedish you need more than 6 extra chars?

Would it be possible to have the script in python? With the lng parameter given 
in an option, something like:
./encode se
./encode fr

Original comment by bson...@gmail.com on 5 Mar 2012 at 8:14

GoogleCodeExporter commented 9 years ago
No, only six are needed. The other ones were thought as placeholders for the 
French characters. ,  I guessed that you would use a common extension bitmap 
for all languages. In that case all extension characters should have had a 
unique ID,  and I guessed that you would place the French ones after the 
Swedish. 
Since you choose to use a separate bitmap per language,  there has to be 
separate tables also. 

I have never written, or even seen Python code, but I can give it a go. How 
hard can it be? 

/Kjell 

Original comment by kjell.kernen on 5 Mar 2012 at 11:03

GoogleCodeExporter commented 9 years ago
Yes there are 2 reasons:
- the swedish chars that you use are not used in french, then it's not good for 
us to have them in first!
- to save flash!

Python, yes, very easy it's a good occasion to give a try :) 

Original comment by bson...@gmail.com on 6 Mar 2012 at 6:39

GoogleCodeExporter commented 9 years ago
OK, I now have the scripts working in Python. It was very easy. Tested on 
Python 2.7 in both Windows and Linux, and surprisingly enough the scripts 
worked the same way on both OSes.
In the process I found a mistake in se.h. I will add that as a new issue, since 
the original one is closed.

Original comment by kjell.kernen on 6 Mar 2012 at 12:04

Attachments:

GoogleCodeExporter commented 9 years ago
I just uploaded a "transcode.py" script which is the merge between the 2 
scripts above. Thanks for your help!

../util/translate.py ./translations/se.h se      => ./translations/se.h.se
../util/translate.py ./translations/se.h.se se   => ./translations/se.h

Original comment by bson...@gmail.com on 11 May 2012 at 4:38