I18N - Charset: Difference between revisions

From The DarkMod Wiki
Jump to navigationJump to search
Tels (talk | contribs)
first stab, needs work for the changed characters
 
Tels (talk | contribs)
update
Line 1: Line 1:
The D3 code that handles the GUI bitmap font can only load a specific range of bytes as characters. To get the most out of the available entries, an special charset (based on ISO 8859-1 with modifications) is used.
== Introduction ==


'''Color code:'''
The D3 code that handles the GUI bitmap font can only load a specific range of bytes as characters. To get the most out of the available entries, special charsets are used. The fonts (Carleton for the menu f.i.) are build/patched so that the right characters appear in the right place.
 
=== Encodings ===
 
Note that the language files (f.i. '''strings/german.lang''') as well as the readables and the FM dictionariaries are expected to be in the following encodings:
 
* '''Czech:''' ISO-8859-2
* '''Russian:''' WIN-1251
* '''All other languages:''' ISO-8859-1
 
The characters are remapped upon loading the dictionary/readable.
 
== European Languages ==
 
This mapping is used for European languages, f.i. '''Czech''', '''French''', '''German''', '''Spanish''', '''Portuguese''', '''Polish'''. Note that the double accented characters in Hungarian '''Ő, ő, Ű and ű''' look a bit different from '''Ö, ö, Ü and ü'''!


{|class="wikitable" border=1 style="border-collapse: collapse; font-size: 95%" cellspacing=0 cellpadding=6
In the table below, the original characters are given in '''()''' below the TDM character.


|-
'''Color code:'''
!style="background: #f0d0d0" title="Character not displayed by D3"|Unusable
!style="background: #00d0f0" title="Changed from the ISO-8859-1 default"|Changed


|}
{{box|#f0d0d0|Character not displayed by D3|Unusable}}{{box|#d0d0f0|Changed from the ISO-8859-1 default|Changed}}


{|class="wikitable" border=1 style="border-collapse: collapse; font-size: 95%" cellspacing=0 cellpadding=2 width=100%
{|class="wikitable" border=1 style="border-collapse: collapse; font-size: 95%" cellspacing=0 cellpadding=2 width=100%
Line 34: Line 46:
|-
|-
!0…
!0…
|align='center' style="background: #f0d0d0"|00<br>'''–'''
|align='center' style='background: #f0d0d0'|00<br>'''–'''
|align='center' style="background: #f0d0d0"|01<br>'''–'''
|align='center' style='background: #f0d0d0'|01<br>'''–'''
|align='center' style="background: #f0d0d0"|02<br>'''–'''
|align='center' style='background: #f0d0d0'|02<br>'''–'''
|align='center' style="background: #f0d0d0"|03<br>'''–'''
|align='center' style='background: #f0d0d0'|03<br>'''–'''
|align='center' style="background: #f0d0d0"|04<br>'''–'''
|align='center' style='background: #f0d0d0'|04<br>'''–'''
|align='center' style="background: #f0d0d0"|05<br>'''–'''
|align='center' style='background: #f0d0d0'|05<br>'''–'''
|align='center' style="background: #f0d0d0"|06<br>'''–'''
|align='center' style='background: #f0d0d0'|06<br>'''–'''
|align='center' style="background: #f0d0d0"|07<br>'''–'''
|align='center' style='background: #f0d0d0'|07<br>'''–'''
|align='center' style="background: #f0d0d0"|08<br>'''–'''
|align='center' style='background: #f0d0d0'|08<br>'''–'''
|align='center' style="background: #f0d0d0"|09<br>'''–'''
|align='center' style='background: #f0d0d0'|09<br>'''–'''
|align='center' style="background: #f0d0d0"|0A<br>'''–'''
|align='center' style='background: #f0d0d0'|0A<br>'''–'''
|align='center' style="background: #f0d0d0"|0B<br>'''–'''
|align='center' style='background: #f0d0d0'|0B<br>'''–'''
|align='center' style="background: #f0d0d0"|0C<br>'''–'''
|align='center' style='background: #f0d0d0'|0C<br>'''–'''
|align='center' style="background: #f0d0d0"|0D<br>'''–'''
|align='center' style='background: #f0d0d0'|0D<br>'''–'''
|align='center' style="background: #f0d0d0"|0E<br>'''–'''
|align='center' style='background: #f0d0d0'|0E<br>'''–'''
|align='center' style="background: #f0d0d0"|0F<br>'''–'''
|align='center' style='background: #f0d0d0'|0F<br>'''–'''


|-
|-
!1…
!1…
|align='center' style="background: #f0d0d0"|10<br>'''–'''
|align='center' style='background: #f0d0d0'|10<br>'''–'''
|align='center' style="background: #f0d0d0"|11<br>'''–'''
|align='center' style='background: #f0d0d0'|11<br>'''–'''
|align='center' style="background: #f0d0d0"|12<br>'''–'''
|align='center' style='background: #f0d0d0'|12<br>'''–'''
|align='center' style="background: #f0d0d0"|13<br>'''–'''
|align='center' style='background: #f0d0d0'|13<br>'''–'''
|align='center' style="background: #f0d0d0"|14<br>'''–'''
|align='center' style='background: #f0d0d0'|14<br>'''–'''
|align='center' style="background: #f0d0d0"|15<br>'''–'''
|align='center' style='background: #f0d0d0'|15<br>'''–'''
|align='center' style="background: #f0d0d0"|16<br>'''–'''
|align='center' style='background: #f0d0d0'|16<br>'''–'''
|align='center' style="background: #f0d0d0"|17<br>'''–'''
|align='center' style='background: #f0d0d0'|17<br>'''–'''
|align='center' style="background: #f0d0d0"|18<br>'''–'''
|align='center' style='background: #f0d0d0'|18<br>'''–'''
|align='center' style="background: #f0d0d0"|19<br>'''–'''
|align='center' style='background: #f0d0d0'|19<br>'''–'''
|align='center' style="background: #f0d0d0"|1A<br>'''–'''
|align='center' style='background: #f0d0d0'|1A<br>'''–'''
|align='center' style="background: #f0d0d0"|1B<br>'''–'''
|align='center' style='background: #f0d0d0'|1B<br>'''–'''
|align='center' style="background: #f0d0d0"|1C<br>'''–'''
|align='center' style='background: #f0d0d0'|1C<br>'''–'''
|align='center' style="background: #f0d0d0"|1D<br>'''–'''
|align='center' style='background: #f0d0d0'|1D<br>'''–'''
|align='center' style="background: #f0d0d0"|1E<br>'''–'''
|align='center' style='background: #f0d0d0'|1E<br>'''–'''
|align='center' style="background: #f0d0d0"|1F<br>'''–'''
|align='center' style='background: #f0d0d0'|1F<br>'''–'''


|-
|-
!2…
!2…
|align='center'|20<br>&nbsp;
|align='center'|20<br>'''&nbsp;'''
|align='center'|21<br>'''!'''
|align='center'|21<br>'''!'''
|align='center'|22<br>'''"'''
|align='center'|22<br>'''"'''
Line 182: Line 194:
|align='center'|7D<br>'''}'''
|align='center'|7D<br>'''}'''
|align='center'|7E<br>'''~'''
|align='center'|7E<br>'''~'''
|align='center' style="background: #f0d0d0"|7F<br>'''–'''
|align='center' style='background: #f0d0d0'|7F<br>'''–'''


|-
|-
!8…
!8…
|align='center' style="background: #f0d0d0"|80<br>'''–'''
|align='center' style='background: #f0d0d0'|80<br>'''–'''
|align='center' style="background: #f0d0d0"|81<br>'''–'''
|align='center' style='background: #f0d0d0'|81<br>'''–'''
|align='center' style="background: #f0d0d0"|82<br>'''–'''
|align='center' style='background: #f0d0d0'|82<br>'''–'''
|align='center' style="background: #f0d0d0"|83<br>'''–'''
|align='center' style='background: #f0d0d0'|83<br>'''–'''
|align='center' style="background: #f0d0d0"|84<br>'''–'''
|align='center' style='background: #f0d0d0'|84<br>'''–'''
|align='center' style="background: #f0d0d0"|85<br>'''–'''
|align='center' style='background: #f0d0d0'|85<br>'''–'''
|align='center' style="background: #f0d0d0"|86<br>'''–'''
|align='center' style='background: #f0d0d0'|86<br>'''–'''
|align='center' style="background: #f0d0d0"|87<br>'''–'''
|align='center' style='background: #f0d0d0'|87<br>'''–'''
|align='center' style="background: #f0d0d0"|88<br>'''–'''
|align='center' style='background: #f0d0d0'|88<br>'''–'''
|align='center' style="background: #f0d0d0"|89<br>'''–'''
|align='center' style='background: #f0d0d0'|89<br>'''–'''
|align='center' style="background: #f0d0d0"|8A<br>'''–'''
|align='center' style='background: #f0d0d0'|8A<br>'''–'''
|align='center' style="background: #f0d0d0"|8B<br>'''–'''
|align='center' style='background: #f0d0d0'|8B<br>'''–'''
|align='center' style="background: #f0d0d0"|8C<br>'''–'''
|align='center' style='background: #f0d0d0'|8C<br>'''–'''
|align='center' style="background: #f0d0d0"|8D<br>'''–'''
|align='center' style='background: #f0d0d0'|8D<br>'''–'''
|align='center' style="background: #f0d0d0"|8E<br>'''–'''
|align='center' style='background: #f0d0d0'|8E<br>'''–'''
|align='center' style="background: #f0d0d0"|8F<br>'''–'''
|align='center' style='background: #f0d0d0'|8F<br>'''–'''


|-
|-
!9…
!9…
|align='center' style="background: #f0d0d0"|90<br>'''–'''
|align='center' style='background: #f0d0d0'|90<br>'''–'''
|align='center' style="background: #f0d0d0"|91<br>'''–'''
|align='center' style='background: #f0d0d0'|91<br>'''–'''
|align='center' style="background: #f0d0d0"|92<br>'''–'''
|align='center' style='background: #f0d0d0'|92<br>'''–'''
|align='center' style="background: #f0d0d0"|93<br>'''–'''
|align='center' style='background: #f0d0d0'|93<br>'''–'''
|align='center' style="background: #f0d0d0"|94<br>'''–'''
|align='center' style='background: #f0d0d0'|94<br>'''–'''
|align='center' style="background: #f0d0d0"|95<br>'''–'''
|align='center' style='background: #f0d0d0'|95<br>'''–'''
|align='center' style="background: #f0d0d0"|96<br>'''–'''
|align='center' style='background: #f0d0d0'|96<br>'''–'''
|align='center' style="background: #f0d0d0"|97<br>'''–'''
|align='center' style='background: #f0d0d0'|97<br>'''–'''
|align='center' style="background: #f0d0d0"|98<br>'''–'''
|align='center' style='background: #f0d0d0'|98<br>'''–'''
|align='center' style="background: #f0d0d0"|99<br>'''–'''
|align='center' style='background: #f0d0d0'|99<br>'''–'''
|align='center' style="background: #f0d0d0"|9A<br>'''–'''
|align='center' style='background: #f0d0d0'|9A<br>'''–'''
|align='center' style="background: #f0d0d0"|9B<br>'''–'''
|align='center' style='background: #f0d0d0'|9B<br>'''–'''
|align='center' style="background: #f0d0d0"|9C<br>'''–'''
|align='center' style='background: #f0d0d0'|9C<br>'''–'''
|align='center' style="background: #f0d0d0"|9D<br>'''–'''
|align='center' style='background: #f0d0d0'|9D<br>'''–'''
|align='center' style="background: #f0d0d0"|9E<br>'''–'''
|align='center' style='background: #f0d0d0'|9E<br>'''–'''
|align='center' style="background: #f0d0d0"|9F<br>'''–'''
|align='center' style='background: #f0d0d0'|9F<br>'''–'''


|-
|-
!A…
!A…
|align='center'|A0<br>''' '''
|align='center'|A0<br>'''[https://secure.wikimedia.org/wikipedia/en/wiki/Non-breaking_space NBSP]'''
|align='center'|A1<br>'''¡'''
|align='center'|A1<br>'''¡'''
|align='center'|A2<br>'''¢'''
|align='center' style='background: #d0d0f0'|A2<br>'''Ű'''<br>(¢)'''
|align='center'|A3<br>'''£'''
|align='center' style='background: #d0d0f0'|A3<br>'''ě'''<br>(£)'''
|align='center'|A4<br>'''¤'''
|align='center' style='background: #d0d0f0'|A4<br>'''ű'''<br>(¤)'''
|align='center'|A5<br>'''¥'''
|align='center' style='background: #d0d0f0'|A5<br>'''Ě'''<br>(¥)'''
|align='center'|A6<br>'''¦'''
|align='center' style='background: #d0d0f0'|A6<br>'''Š'''<br>(¦)'''
|align='center'|A7<br>'''§'''
|align='center'|A7<br>'''§'''
|align='center'|A8<br>'''¨'''
|align='center' style='background: #d0d0f0'|A8<br>'''š'''<br>(¨)'''
|align='center'|A9<br>'''©'''
|align='center' style='background: #d0d0f0'|A9<br>'''Ů'''<br>(©)'''
|align='center'|AA<br>'''ª'''
|align='center' style='background: #d0d0f0'|AA<br>'''Ą'''<br>(ª)'''
|align='center'|AB<br>'''«'''
|align='center' style='background: #d0d0f0'|AB<br>'''Ę'''<br>(«)'''
|align='center'|AC<br>'''¬'''
|align='center' style='background: #d0d0f0'|AC<br>'''Č'''<br>(¬)'''
|align='center'|AD<br>'''­'''
|align='center'|AD<br>'''[https://secure.wikimedia.org/wikipedia/en/wiki/Soft_hyphen SHY]'''
|align='center'|AE<br>'''®'''
|align='center' style='background: #d0d0f0'|AE<br>'''č'''<br>(®)'''
|align='center'|AF<br>'''¯'''
|align='center' style='background: #d0d0f0'|AF<br>'''ů'''<br>(¯)'''


|-
|-
!B…
!B…
|align='center'|B0<br>'''°'''
|align='center' style='background: #d0d0f0'|B0<br>'''Ő'''<br>(°)'''
|align='center'|B1<br>'''±'''
|align='center' style='background: #d0d0f0'|B1<br>'''Ł'''<br>(±)'''
|align='center'|B2<br>'''²'''
|align='center' style='background: #d0d0f0'|B2<br>'''Ť'''<br>(²)'''
|align='center'|B3<br>'''³'''
|align='center' style='background: #d0d0f0'|B3<br>'''Ď'''<br>(³)'''
|align='center'|B4<br>'''´'''
|align='center' style='background: #d0d0f0'|B4<br>'''Ž'''<br>(´)'''
|align='center'|B5<br>'''µ'''
|align='center' style='background: #d0d0f0'|B5<br>'''ł'''<br>(µ)'''
|align='center'|B6<br>'''¶'''
|align='center' style='background: #d0d0f0'|B6<br>'''ť'''<br>()'''
|align='center'|B7<br>'''·'''
|align='center' style='background: #d0d0f0'|B7<br>'''ď'''<br>(·)'''
|align='center'|B8<br>'''¸'''
|align='center' style='background: #d0d0f0'|B8<br>'''ž'''<br>(¸)'''
|align='center'|B9<br>'''¹'''
|align='center' style='background: #d0d0f0'|B9<br>'''ő'''<br>(¹)'''
|align='center'|BA<br>'''º'''
|align='center' style='background: #d0d0f0'|BA<br>'''ą'''<br>(º)'''
|align='center'|BB<br>'''»'''
|align='center' style='background: #d0d0f0'|BB<br>'''ę'''<br>(»)'''
|align='center'|BC<br>'''¼'''
|align='center' style='background: #d0d0f0'|BC<br>'''Œ'''<br>(¼)'''
|align='center'|BD<br>'''½'''
|align='center' style='background: #d0d0f0'|BD<br>'''œ'''<br>(½)'''
|align='center'|BE<br>'''¾'''
|align='center' style='background: #d0d0f0'|BE<br>'''Ÿ'''<br>(¾)'''
|align='center'|BF<br>'''¿'''
|align='center'|BF<br>'''¿'''


Line 288: Line 300:
|align='center'|D5<br>'''Õ'''
|align='center'|D5<br>'''Õ'''
|align='center'|D6<br>'''Ö'''
|align='center'|D6<br>'''Ö'''
|align='center'|D7<br>'''×'''
|align='center' style='background: #d0d0f0'|D7<br>'''Ř'''<br>(×)'''
|align='center'|D8<br>'''Ø'''
|align='center'|D8<br>'''Ø'''
|align='center'|D9<br>'''Ù'''
|align='center'|D9<br>'''Ù'''
Line 326: Line 338:
|align='center'|F5<br>'''õ'''
|align='center'|F5<br>'''õ'''
|align='center'|F6<br>'''ö'''
|align='center'|F6<br>'''ö'''
|align='center'|F7<br>'''÷'''
|align='center' style='background: #d0d0f0'|F7<br>'''ř'''<br>(÷)'''
|align='center'|F8<br>'''ø'''
|align='center'|F8<br>'''ø'''
|align='center'|F9<br>'''ù'''
|align='center'|F9<br>'''ù'''
Line 334: Line 346:
|align='center'|FD<br>'''ý'''
|align='center'|FD<br>'''ý'''
|align='center'|FE<br>'''þ'''
|align='center'|FE<br>'''þ'''
|align='center' style="background: #f0d0d0"|FF<br>'''–'''
|align='center' style='background: #f0d0d0'|FF<br>'''–'''


|}
|}
=== Russian ===
The character '''0xFF''' (я) is mapped to '''0xB6''' upon loading. Therefore any Russian font must contain я at the place 0xB6.


{{i18n}}
{{i18n}}

Revision as of 11:52, 4 November 2011

Introduction

The D3 code that handles the GUI bitmap font can only load a specific range of bytes as characters. To get the most out of the available entries, special charsets are used. The fonts (Carleton for the menu f.i.) are build/patched so that the right characters appear in the right place.

Encodings

Note that the language files (f.i. strings/german.lang) as well as the readables and the FM dictionariaries are expected to be in the following encodings:

  • Czech: ISO-8859-2
  • Russian: WIN-1251
  • All other languages: ISO-8859-1

The characters are remapped upon loading the dictionary/readable.

European Languages

This mapping is used for European languages, f.i. Czech, French, German, Spanish, Portuguese, Polish. Note that the double accented characters in Hungarian Ő, ő, Ű and ű look a bit different from Ö, ö, Ü and ü!

In the table below, the original characters are given in () below the TDM character.

Color code:

UnusableChanged

…0 …1 …2 …3 …4 …5 …6 …7 …8 …9 …A …B …C …D …E …F
0… 00
01
02
03
04
05
06
07
08
09
0A
0B
0C
0D
0E
0F
1… 10
11
12
13
14
15
16
17
18
19
1A
1B
1C
1D
1E
1F
2… 20
 
21
!
22
"
23
#
24
$
25
%
26
&
27
''
28
(
29
)
2A
*
2B
+
2C
,
2D
-
2E
.
2F
/
3… 30
0
31
1
32
2
33
3
34
4
35
5
36
6
37
7
38
8
39
9
3A
:
3B
;
3C
<
3D
=
3E
>
3F
?
4… 40
@
41
A
42
B
43
C
44
D
45
E
46
F
47
G
48
H
49
I
4A
J
4B
K
4C
L
4D
M
4E
N
4F
O
5… 50
P
51
Q
52
R
53
S
54
T
55
U
56
V
57
W
58
X
59
Y
5A
Z
5B
[
5C
\
5D
]
5E
^
5F
_
6… 60
`
61
a
62
b
63
c
64
d
65
e
66
f
67
g
68
h
69
i
6A
j
6B
k
6C
l
6D
m
6E
n
6F
o
7… 70
p
71
q
72
r
73
s
74
t
75
u
76
v
77
w
78
x
79
y
7A
z
7B
{
7C
|
7D
}
7E
~
7F
8… 80
81
82
83
84
85
86
87
88
89
8A
8B
8C
8D
8E
8F
9… 90
91
92
93
94
95
96
97
98
99
9A
9B
9C
9D
9E
9F
A… A0
NBSP
A1
¡
A2
Ű
(¢)
A3
ě
(£)
A4
ű
(¤)
A5
Ě
(¥)
A6
Š
(¦)
A7
§
A8
š
(¨)
A9
Ů
(©)
AA
Ą
(ª)
AB
Ę
(«)
AC
Č
(¬)
AD
SHY
AE
č
(®)
AF
ů
(¯)
B… B0
Ő
(°)
B1
Ł
(±)
B2
Ť
(²)
B3
Ď
(³)
B4
Ž
(´)
B5
ł
(µ)
B6
ť
(¶)
B7
ď
(·)
B8
ž
(¸)
B9
ő
(¹)
BA
ą
(º)
BB
ę
(»)
BC
Œ
(¼)
BD
œ
(½)
BE
Ÿ
(¾)
BF
¿
C… C0
À
C1
Á
C2
Â
C3
Ã
C4
Ä
C5
Å
C6
Æ
C7
Ç
C8
È
C9
É
CA
Ê
CB
Ë
CC
Ì
CD
Í
CE
Î
CF
Ï
D… D0
Ð
D1
Ñ
D2
Ò
D3
Ó
D4
Ô
D5
Õ
D6
Ö
D7
Ř
(×)
D8
Ø
D9
Ù
DA
Ú
DB
Û
DC
Ü
DD
Ý
DE
Þ
DF
ß
E… E0
à
E1
á
E2
â
E3
ã
E4
ä
E5
å
E6
æ
E7
ç
E8
è
E9
é
EA
ê
EB
ë
EC
ì
ED
í
EE
î
EF
ï
F… F0
ð
F1
ñ
F2
ò
F3
ó
F4
ô
F5
õ
F6
ö
F7
ř
(÷)
F8
ø
F9
ù
FA
ú
FB
û
FC
ü
FD
ý
FE
þ
FF

Russian

The character 0xFF (я) is mapped to 0xB6 upon loading. Therefore any Russian font must contain я at the place 0xB6.


See Also

Translation resources

Overview of translations

Translation discussions