Repository: ParadoxAlarmInterface/pai (language: python)

Issue:
MQTT discovery config topics should not contain UTF-8 characters
hello, I have this Warning in log:

WARNING  - PAI.paradox.hardware.panel - Unable to properly decode label b'Sens.Scale 1\xd2 P' using the utf-8 encoding.
                     Specify a different encoding using the LABEL_ENCODING configuration option.
2021-02-10 22:29:52,139 - WARNING  - PAI.paradox.hardware.panel - Unable to properly decode label b'Fin. Bagno 1\xd2 P' using the utf-8 encoding.

I used the character °, the complete string is "Sens.Scale 1 ° P". I think it is enough to indicate a different character set in LABEL_ENCODING, I have also tried but without success.
Is it possible to fix this warning somehow?




Discussion / hints:
I have a similar issue with French accents:

2021-02-11 10:06:43,567 - WARNING  - PAI.paradox.hardware.panel - Unable to properly decode label b'Salle \x9c diner' using the utf-8 encoding.
                     Specify a different encoding using the LABEL_ENCODING configuration option.

No matter which encoding I tried, I could never get it to properly decode the label, "Salle à diner" in this case. So I just left the default value and managed the names in HomeAssistant. 
Try `paradox-en` as `LABEL_ENCODING`, it might work. Paradox has a weird custom encoding we did not covered all the symbols.
Yes, by using `paradox-en` the labels are now loaded properly. However, it seems HomeAssistant Auto Discovery doesn't like them, because they never show up in HA entities even though I see them properly in MQTT. 
can be that some symbols are not allowed in ids. Please send some `config` payloads.
From this paths:
- `homeassistant/alarm_control_panel/<panel_serial>/<name>/config`
- `homeassistant/binary_sensor/<panel_serial>/<name>/config`
> can be that some symbols are not allowed in ids. Please send some `config` payloads.

Here's one that doesn't show up in HA:

Control Panel:
`{"name": "CHALET", "unique_id": "XXXXXXXX_partition_CHALET", "command_topic": "alarme-chalet/control/partitions/CHALET", "state_topic": "alarme-chalet/states/partitions/CHALET/current_state", "availability_topic": "alarme-chalet/interface/availability", "device": {"manufacturer": "Paradox", "model": "SP7000", "identifiers": ["Paradox", "SP7000", "XXXXXXXX"], "name": "SP7000", "sw_version": "4.94 build 0"}, "payload_disarm": "disarm", "payload_arm_home": "arm_stay", "payload_arm_away": "arm", "payload_arm_night": "arm_sleep"}`

Binary Sensor:
`{"name": "Fum\u00e9e sous-sol", "unique_id": "XXXXXXXX_zone_Fum\u00e9e_sous_sol_open", "state_topic": "alarme-chalet/states/zones/Fum\u00e9e_sous_sol/open", "device_class": "motion", "availability_topic": "alarme-chalet/interface/availability", "payload_on": "True", "payload_off": "False", "device": {"manufacturer": "Paradox", "model": "SP7000", "identifiers": ["Paradox", "SP7000", "XXXXXXXX"], "name": "SP7000", "sw_version": "4.94 build 0"}}`
ok. First is because of #204. Fix is coming.
No idea about second one. Check home assistant logs
I am experiencing the same issue with Hungarian special chars (if using `paradox-en`). The special characters are not appearing at all if using `utf8` or `latin2`.

```
Host1:
	HA: core-2021.2.3 in docker (with Python: 3.8.7)
	MQTT broker: Eclipse Mosquitto in docker (v2.0.7)

Host2:
	PAI: v2.3.1
		paho: v1.5.1
		pyserial: v3.5
```
Panel:

```
2021-02-20 09:54:33,042 - INFO     - PAI.paradox.paradox - Panel Identified MG5000 version 4.86 build 6
```
HA log:

Message is received on HA side

```
2021-02-20 09:54:43 DEBUG (Thread-5) [paho.mqtt.client] Received PUBLISH (d0, q0, r0, m0), 'homeassistant/binary_sensor/XXXXXXXX/Bejárati_Ajtó/config', ...  (446 bytes)

2021-02-20 09:54:43 DEBUG (MainThread) [homeassistant.components.mqtt] Received message on homeassistant/binary_sensor/XXXXXXXX/Bejárati_Ajtó/config: b'{"name": "Bej\\u00e1rati Ajt\\u00f3", "unique_id": "XXXXXXXX_zone_Bej\\u00e1rati_Ajt\\u00f3_open", "state_topic": "paradox/states/zones/Bej\\u00e1rati_Ajt\\u00f3/open", "device_class": "motion", "availability_topic": "paradox/interface/availability", "payload_on": "True", "payload_off": "False", "device": {"manufacturer": "Paradox", "model": "MG5000", "identifiers": ["Paradox", "MG5000", "XXXXXXXX"], "name": "MG5000", "sw_version": "4.86 build 6"}}'
```

But cannot find 'process discovery payload' entry for the sensor which has the special char. It exists for all others:

```
2021-02-20 09:54:43 DEBUG (MainThread) [homeassistant.components.mqtt.discovery] Process discovery payload 
```
hmm, maybe home assistant does not like utf-8 chars in mqtt topic?
@tekand Can you try to replace special chars in hte topic and resubmit the payload. Will it appear in home assistant?
Certainly. Can you please elaborate a bit more on how to do that? This is my first pai and mqtt install.
Get MQTT Explorer, there should be simple to do
I have MQTT Explorer, but did not find hte topic. 

Not sure how relevant, but the following doc says that the id should be `[a-zA-Z0-9_-]`.
https://www.home-assistant.io/docs/mqtt/discovery/#discovery_prefix

I guess that means that utf-8 special chars are not supported in the id, but maybe in the name attribute.

Fix patch:
diff --git a/paradox/lib/encodings/__init__.py b/paradox/lib/encodings/__init__.py
index c9c558ed..b802a6a0 100644
--- a/paradox/lib/encodings/__init__.py
+++ b/paradox/lib/encodings/__init__.py
@@ -18,12 +18,55 @@ def paradox_codec_search(name: str):
             return mod
         else:
             try:
-                module = import_module("." + enc, "paradox.lib.encodings")
-                mod = codec_cache[enc] = module.getregentry()
+                mod = codec_cache[enc] = getregentry(enc)
                 logger.debug(f"Loaded {name} encoding")
                 return mod
             except ImportError:
-                pass
+                pass         
+
+
+def getregentry(enc):
+
+    module = import_module("." + enc, "paradox.lib.encodings.charmaps")
+    
+    decoding_table = module.charmap
+    encoding_table = codecs.charmap_build(decoding_table)
+
+
+    class Codec(codecs.Codec):
+        def encode(self, input, errors="strict"):
+            return codecs.charmap_encode(input, errors, encoding_table)
+
+        def decode(self, input, errors="strict"):
+            return codecs.charmap_decode(input, errors, decoding_table)
+
+
+    class IncrementalEncoder(codecs.IncrementalEncoder):
+        def encode(self, input, final=False):
+            return codecs.charmap_encode(input, self.errors, encoding_table)[0]
+
+
+    class IncrementalDecoder(codecs.IncrementalDecoder):
+        def decode(self, input, final=False):
+            return codecs.charmap_decode(input, self.errors, decoding_table)[0]
+
+
+    class StreamWriter(Codec, codecs.StreamWriter):
+        pass
+
+
+    class StreamReader(Codec, codecs.StreamReader):
+        pass
+
+    return codecs.CodecInfo(
+        name="paradox-"+enc,
+        encode=Codec().encode,
+        decode=Codec().decode,
+        incrementalencoder=IncrementalEncoder,
+        incrementaldecoder=IncrementalDecoder,
+        streamreader=StreamReader,
+        streamwriter=StreamWriter,
+    )
 
 
 def register_encodings():
diff --git a/paradox/lib/encodings/charmaps/__init__.py b/paradox/lib/encodings/charmaps/__init__.py
new file mode 100644
index 00000000..e69de29b
diff --git a/paradox/lib/encodings/charmaps/de.py b/paradox/lib/encodings/charmaps/de.py
new file mode 100644
index 00000000..d40b41b5
--- /dev/null
+++ b/paradox/lib/encodings/charmaps/de.py
@@ -0,0 +1,259 @@
+# paradox encoding paradox-de
+charmap = (
+"\x00" # 0 0x0000
+"ü" # 1 0x00fc
+" " # 2 0x0020
+" " # 3 0x0020
+" " # 4 0x0020
+" " # 5 0x0020
+" " # 6 0x0020
+" " # 7 0x0020
+" " # 8 0x0020
+" " # 9 0x0020
+" " # 10 0x0020
+" " # 11 0x0020
+" " # 12 0x0020
+" " # 13 0x0020
+" " # 14 0x0020
+" " # 15 0x0020
+" " # 16 0x0020
+" " # 17 0x0020
+" " # 18 0x0020
+" " # 19 0x0020
+" " # 20 0x0020
+" " # 21 0x0020
+" " # 22 0x0020
+" " # 23 0x0020
+" " # 24 0x0020
+" " # 25 0x0020
+" " # 26 0x0020
+" " # 27 0x0020
+" " # 28 0x0020
+" " # 29 0x0020
+" " # 30 0x0020
+" " # 31 0x0020
+" " # 32 0x0020
+"!" # 33 0x0021
+"\"" # 34 0x0022
+"#" # 35 0x0023
+"$" # 36 0x0024
+"%" # 37 0x0025
+"&" # 38 0x0026
+"'" # 39 0x0027
+"(" # 40 0x0028
+")" # 41 0x0029
+"*" # 42 0x002a
+"+" # 43 0x002b
+"," # 44 0x002c
+"-" # 45 0x002d
+"." # 46 0x002e
+"/" # 47 0x002f
+"0" # 48 0x0030
+"1" # 49 0x0031
+"2" # 50 0x0032
+"3" # 51 0x0033
+"4" # 52 0x0034
+"5" # 53 0x0035
+"6" # 54 0x0036
+"7" # 55 0x0037
+"8" # 56 0x0038
+"9" # 57 0x0039
+":" # 58 0x003a
+";" # 59 0x003b
+"<" # 60 0x003c
+"=" # 61 0x003d
+">" # 62 0x003e
+"?" # 63 0x003f
+"@" # 64 0x0040
+"A" # 65 0x0041
+"B" # 66 0x0042
+"C" # 67 0x0043
+"D" # 68 0x0044
+"E" # 69 0x0045
+"F" # 70 0x0046
+"G" # 71 0x0047
+"H" # 72 0x0048
+"I" # 73 0x0049
+"J" # 74 0x004a
+"K" # 75 0x004b
+"L" # 76 0x004c
+"M" # 77 0x004d
+"N" # 78 0x004e
+"O" # 79 0x004f
+"P" # 80 0x0050
+"Q" # 81 0x0051
+"R" # 82 0x0052
+"S" # 83 0x0053
+"T" # 84 0x0054
+"U" # 85 0x0055
+"V" # 86 0x0056
+"W" # 87 0x0057
+"X" # 88 0x0058
+"Y" # 89 0x0059
+"Z" # 90 0x005a
+"[" # 91 0x005b
+"\\" # 92 0x005c
+"]" # 93 0x005d
+"^" # 94 0x005e
+"_" # 95 0x005f
+"`" # 96 0x0060
+"a" # 97 0x0061
+"b" # 98 0x0062
+"c" # 99 0x0063
+"d" # 100 0x0064
+"e" # 101 0x0065
+"f" # 102 0x0066
+"g" # 103 0x0067
+"h" # 104 0x0068
+"i" # 105 0x0069
+"j" # 106 0x006a
+"k" # 107 0x006b
+"l" # 108 0x006c
+"m" # 109 0x006d
+"n" # 110 0x006e
+"o" # 111 0x006f
+"p" # 112 0x0070
+"q" # 113 0x0071
+"r" # 114 0x0072
+"s" # 115 0x0073
+"t" # 116 0x0074
+"u" # 117 0x0075
+"v" # 118 0x0076
+"w" # 119 0x0077
+"x" # 120 0x0078
+"y" # 121 0x0079
+"z" # 122 0x007a
+"{" # 123 0x007b
+"|" # 124 0x007c
+"}" # 125 0x007d
+"~" # 126 0x007e
+"\x7f" # 127 0x007f
+"Û" # 128 0x00db
+"Ù" # 129 0x00d9
+"Ú" # 130 0x00da
+"Ü" # 131 0x00dc
+"û" # 132 0x00fb
+"ù" # 133 0x00f9
+"ú" # 134 0x00fa
+"Ô" # 135 0x00d4
+"Ò" # 136 0x00d2
+"Ó" # 137 0x00d3
+"°" # 138 0x00b0
+"ô" # 139 0x00f4
+"ò" # 140 0x00f2
+"ó" # 141 0x00f3
+"ö" # 142 0x00f6
+"¿" # 143 0x00bf
+"Ê" # 144 0x00ca
+"È" # 145 0x00c8
+"É" # 146 0x00c9
+"Ë" # 147 0x00cb
+"ê" # 148 0x00ea
+"è" # 149 0x00e8
+"é" # 150 0x00e9
+"ë" # 151 0x00eb
+"Å" # 152 0x00c5
+"Ä" # 153 0x00c4
+"å" # 154 0x00e5
+"â" # 155 0x00e2
+"à" # 156 0x00e0
+"á" # 157 0x00e1
+"ä" # 158 0x00e4
+"ª" # 159 0x00aa
+"ª" # 160 0x00aa
+"î" # 161 0x00ee
+"ì" # 162 0x00ec
+"í" # 163 0x00ed
+"ï" # 164 0x00ef
+"¡" # 165 0x00a1
+"Ñ" # 166 0x00d1
+"ñ" # 167 0x00f1
+"Ñ" # 168 0x00d1
+" " # 169 0x0020
+" " # 170 0x0020
+" " # 171 0x0020
+" " # 172 0x0020
+" " # 173 0x0020
+" " # 174 0x0020
+"Æ" # 175 0x00c6
+"§" # 176 0x00a7
+"±" # 177 0x00b1
+" " # 178 0x0020
+" " # 179 0x0020
+" " # 180 0x0020
+" " # 181 0x0020
+"\x83" # 182 0x0083
+"£" # 183 0x00a3
+" " # 184 0x0020
+" " # 185 0x0020
+" " # 186 0x0020
+" " # 187 0x0020
+"¶" # 188 0x00b6
+"½" # 189 0x00bd
+" " # 190 0x0020
+"¼" # 191 0x00bc
+"ø" # 192 0x00f8
+" " # 193 0x0020
+"Ð" # 194 0x00d0
+"ß" # 195 0x00df
+"ç" # 196 0x00e7
+"®" # 197 0x00ae
+" " # 198 0x0020
+" " # 199 0x0020
+"µ" # 200 0x00b5
+"ø" # 201 0x00f8
+"ÿ" # 202 0x00ff
+"Ã" # 203 0x00c3
+"¢" # 204 0x00a2
+"ã" # 205 0x00e3
+"Õ" # 206 0x00d5
+"õ" # 207 0x00f5
+"·" # 208 0x00b7
+"¨" # 209 0x00a8
+"°" # 210 0x00b0
+" " # 211 0x0020
+"´" # 212 0x00b4
+"~" # 213 0x007e
+"÷" # 214 0x00f7
+"«" # 215 0x00ab
+"»" # 216 0x00bb
+" " # 217 0x0020
+"\\" # 218 0x005c
+"×" # 219 0x00d7
+"®" # 220 0x00ae
+"©" # 221 0x00a9
+" " # 222 0x0020
+" " # 223 0x0020
+" " # 224 0x0020
+" " # 225 0x0020
+" " # 226 0x0020
+" " # 227 0x0020
+" " # 228 0x0020
+" " # 229 0x0020
+" " # 230 0x0020
+" " # 231 0x0020
+" " # 232 0x0020
+" " # 233 0x0020
+" " # 234 0x0020
+" " # 235 0x0020
+" " # 236 0x0020
+" " # 237 0x0020
+" " # 238 0x0020
+" " # 239 0x0020
+" " # 240 0x0020
+" " # 241 0x0020
+" " # 242 0x0020
+" " # 243 0x0020
+" " # 244 0x0020
+" " # 245 0x0020
+" " # 246 0x0020
+" " # 247 0x0020
+" " # 248 0x0020
+" " # 249 0x0020
+" " # 250 0x0020
+" " # 251 0x0020
+" " # 252 0x0020
+" " # 253 0x0020
+" " # 254 0x0020
+" " # 255 0x0020
+)
diff --git a/paradox/lib/encodings/charmaps/ee.py b/paradox/lib/encodings/charmaps/ee.py
new file mode 100644
index 00000000..b53b6b00
--- /dev/null
+++ b/paradox/lib/encodings/charmaps/ee.py
@@ -0,0 +1,259 @@
+# paradox encoding paradox-ee
+charmap = (
+"\x00" # 0 0x0000
+"ü" # 1 0x00fc
+" " # 2 0x0020
+" " # 3 0x0020
+" " # 4 0x0020
+" " # 5 0x0020
+" " # 6 0x0020
+" " # 7 0x0020
+" " # 8 0x0020
+" " # 9 0x0020
+" " # 10 0x0020
+" " # 11 0x0020
+" " # 12 0x0020
+" " # 13 0x0020
+" " # 14 0x0020
+" " # 15 0x0020
+" " # 16 0x0020
+" " # 17 0x0020
+" " # 18 0x0020
+" " # 19 0x0020
+" " # 20 0x0020
+" " # 21 0x0020
+" " # 22 0x0020
+" " # 23 0x0020
+" " # 24 0x0020
+" " # 25 0x0020
+" " # 26 0x0020
+" " # 27 0x0020
+" " # 28 0x0020
+" " # 29 0x0020
+" " # 30 0x0020
+" " # 31 0x0020
+" " # 32 0x0020
+"!" # 33 0x0021
+"\"" # 34 0x0022
+"#" # 35 0x0023
+"$" # 36 0x0024
+"%" # 37 0x0025
+"&" # 38 0x0026
+"'" # 39 0x0027
+"(" # 40 0x0028
+")" # 41 0x0029
+"*" # 42 0x002a
+"+" # 43 0x002b
+"," # 44 0x002c
+"-" # 45 0x002d
+"." # 46 0x002e
+"/" # 47 0x002f
+"0" # 48 0x0030
+"1" # 49 0x0031
+"2" # 50 0x0032
+"3" # 51 0x0033
+"4" # 52 0x0034
+"5" # 53 0x0035
+"6" # 54 0x0036
+"7" # 55 0x0037
+"8" # 56 0x0038
+"9" # 57 0x0039
+":" # 58 0x003a
+";" # 59 0x003b
+"<" # 60 0x003c
+"=" # 61 0x003d
+">" # 62 0x003e
+"?" # 63 0x003f
+"@" # 64 0x0040
+"A" # 65 0x0041
+"B" # 66 0x0042
+"C" # 67 0x0043
+"D" # 68 0x0044
+"E" # 69 0x0045
+"F" # 70 0x0046
+"G" # 71 0x0047
+"H" # 72 0x0048
+"I" # 73 0x0049
+"J" # 74 0x004a
+"K" # 75 0x004b
+"L" # 76 0x004c
+"M" # 77 0x004d
+"N" # 78 0x004e
+"O" # 79 0x004f
+"P" # 80 0x0050
+"Q" # 81 0x0051
+"R" # 82 0x0052
+"S" # 83 0x0053
+"T" # 84 0x0054
+"U" # 85 0x0055
+"V" # 86 0x0056
+"W" # 87 0x0057
+"X" # 88 0x0058
+"Y" # 89 0x0059
+"Z" # 90 0x005a
+"[" # 91 0x005b
+"\\" # 92 0x005c
+"]" # 93 0x005d
+"^" # 94 0x005e
+"_" # 95 0x005f
+"`" # 96 0x0060
+"a" # 97 0x0061
+"b" # 98 0x0062
+"c" # 99 0x0063
+"d" # 100 0x0064
+"e" # 101 0x0065
+"f" # 102 0x0066
+"g" # 103 0x0067
+"h" # 104 0x0068
+"i" # 105 0x0069
+"j" # 106 0x006a
+"k" # 107 0x006b
+"l" # 108 0x006c
+"m" # 109 0x006d
+"n" # 110 0x006e
+"o" # 111 0x006f
+"p" # 112 0x0070
+"q" # 113 0x0071
+"r" # 114 0x0072
+"s" # 115 0x0073
+"t" # 116 0x0074
+"u" # 117 0x0075
+"v" # 118 0x0076
+"w" # 119 0x0077
+"x" # 120 0x0078
+"y" # 121 0x0079
+"z" # 122 0x007a
+"{" # 123 0x007b
+"|" # 124 0x007c
+"}" # 125 0x007d
+"~" # 126 0x007e
+"\x7f" # 127 0x007f
+"Û" # 128 0x00db
+"Ù" # 129 0x00d9
+"Ú" # 130 0x00da
+"Ü" # 131 0x00dc
+"û" # 132 0x00fb
+"ù" # 133 0x00f9
+"ú" # 134 0x00fa
+"Ô" # 135 0x00d4
+"Ò" # 136 0x00d2
+"Ó" # 137 0x00d3
+"°" # 138 0x00b0
+"ô" # 139 0x00f4
+"ò" # 140 0x00f2
+"ó" # 141 0x00f3
+"ö" # 142 0x00f6
+"¿" # 143 0x00bf
+"Ê" # 144 0x00ca
+"È" # 145 0x00c8
+"É" # 146 0x00c9
+"Ë" # 147 0x00cb
+"ê" # 148 0x00ea
+"è" # 149 0x00e8
+"é" # 150 0x00e9
+"ë" # 151 0x00eb
+"Å" # 152 0x00c5
+"Ä" # 153 0x00c4
+"å" # 154 0x00e5
+"â" # 155 0x00e2
+"à" # 156 0x00e0
+"á" # 157 0x00e1
+"ä" # 158 0x00e4
+"ª" # 159 0x00aa
+"ª" # 160 0x00aa
+"î" # 161 0x00ee
+"ì" # 162 0x00ec
+"í" # 163 0x00ed
+"ï" # 164 0x00ef
+"¡" # 165 0x00a1
+"Ñ" # 166 0x00d1
+"ñ" # 167 0x00f1
+"Ñ" # 168 0x00d1
+" " # 169 0x0020
+" " # 170 0x0020
+" " # 171 0x0020
+" " # 172 0x0020
+" " # 173 0x0020
+" " # 174 0x0020
+"Æ" # 175 0x00c6
+"§" # 176 0x00a7
+"±" # 177 0x00b1
+" " # 178 0x0020
+" " # 179 0x0020
+" " # 180 0x0020
+" " # 181 0x0020
+"\x83" # 182 0x0083
+"£" # 183 0x00a3
+" " # 184 0x0020
+" " # 185 0x0020
+" " # 186 0x0020
+" " # 187 0x0020
+"¶" # 188 0x00b6
+"½" # 189 0x00bd
+" " # 190 0x0020
+"¼" # 191 0x00bc
+"ø" # 192 0x00f8
+" " # 193 0x0020
+"Ð" # 194 0x00d0
+"ß" # 195 0x00df
+"ç" # 196 0x00e7
+"®" # 197 0x00ae
+" " # 198 0x0020
+" " # 199 0x0020
+"µ" # 200 0x00b5
+"ø" # 201 0x00f8
+"ÿ" # 202 0x00ff
+"Ã" # 203 0x00c3
+"¢" # 204 0x00a2
+"ã" # 205 0x00e3
+"Õ" # 206 0x00d5
+"õ" # 207 0x00f5
+"·" # 208 0x00b7
+"¨" # 209 0x00a8
+"°" # 210 0x00b0
+" " # 211 0x0020
+"´" # 212 0x00b4
+"~" # 213 0x007e
+"÷" # 214 0x00f7
+"«" # 215 0x00ab
+"»" # 216 0x00bb
+" " # 217 0x0020
+"\\" # 218 0x005c
+"×" # 219 0x00d7
+"®" # 220 0x00ae
+"©" # 221 0x00a9
+" " # 222 0x0020
+" " # 223 0x0020
+" " # 224 0x0020
+" " # 225 0x0020
+" " # 226 0x0020
+" " # 227 0x0020
+" " # 228 0x0020
+" " # 229 0x0020
+" " # 230 0x0020
+" " # 231 0x0020
+" " # 232 0x0020
+" " # 233 0x0020
+" " # 234 0x0020
+" " # 235 0x0020
+" " # 236 0x0020
+" " # 237 0x0020
+" " # 238 0x0020
+" " # 239 0x0020
+" " # 240 0x0020
+" " # 241 0x0020
+" " # 242 0x0020
+" " # 243 0x0020
+" " # 244 0x0020
+" " # 245 0x0020
+" " # 246 0x0020
+" " # 247 0x0020
+" " # 248 0x0020
+" " # 249 0x0020
+" " # 250 0x0020
+" " # 251 0x0020
+" " # 252 0x0020
+" " # 253 0x0020
+" " # 254 0x0020
+" " # 255 0x0020
+)
diff --git a/paradox/lib/encodings/charmaps/en.py b/paradox/lib/encodings/charmaps/en.py
new file mode 100644
index 00000000..49c892aa
--- /dev/null
+++ b/paradox/lib/encodings/charmaps/en.py
@@ -0,0 +1,259 @@
+# paradox encoding paradox-en
+charmap = (
+"\x00" # 0 0x0000
+" " # 1 0x0020
+" " # 2 0x0020
+" " # 3 0x0020
+" " # 4 0x0020
+" " # 5 0x0020
+" " # 6 0x0020
+" " # 7 0x0020
+" " # 8 0x0020
+" " # 9 0x0020
+" " # 10 0x0020
+" " # 11 0x0020
+" " # 12 0x0020
+" " # 13 0x0020
+" " # 14 0x0020
+" " # 15 0x0020
+" " # 16 0x0020
+" " # 17 0x0020
+" " # 18 0x0020
+" " # 19 0x0020
+" " # 20 0x0020
+" " # 21 0x0020
+" " # 22 0x0020
+" " # 23 0x0020
+" " # 24 0x0020
+" " # 25 0x0020
+" " # 26 0x0020
+" " # 27 0x0020
+" " # 28 0x0020
+" " # 29 0x0020
+" " # 30 0x0020
+" " # 31 0x0020
+" " # 32 0x0020
+"!" # 33 0x0021
+"\"" # 34 0x0022
+"#" # 35 0x0023
+"$" # 36 0x0024
+"%" # 37 0x0025
+"&" # 38 0x0026
+"'" # 39 0x0027
+"(" # 40 0x0028
+")" # 41 0x0029
+"*" # 42 0x002a
+"+" # 43 0x002b
+"," # 44 0x002c
+"-" # 45 0x002d
+"." # 46 0x002e
+"/" # 47 0x002f
+"0" # 48 0x0030
+"1" # 49 0x0031
+"2" # 50 0x0032
+"3" # 51 0x0033
+"4" # 52 0x0034
+"5" # 53 0x0035
+"6" # 54 0x0036
+"7" # 55 0x0037
+"8" # 56 0x0038
+"9" # 57 0x0039
+":" # 58 0x003a
+";" # 59 0x003b
+"<" # 60 0x003c
+"=" # 61 0x003d
+">" # 62 0x003e
+"?" # 63 0x003f
+"@" # 64 0x0040
+"A" # 65 0x0041
+"B" # 66 0x0042
+"C" # 67 0x0043
+"D" # 68 0x0044
+"E" # 69 0x0045
+"F" # 70 0x0046
+"G" # 71 0x0047
+"H" # 72 0x0048
+"I" # 73 0x0049
+"J" # 74 0x004a
+"K" # 75 0x004b
+"L" # 76 0x004c
+"M" # 77 0x004d
+"N" # 78 0x004e
+"O" # 79 0x004f
+"P" # 80 0x0050
+"Q" # 81 0x0051
+"R" # 82 0x0052
+"S" # 83 0x0053
+"T" # 84 0x0054
+"U" # 85 0x0055
+"V" # 86 0x0056
+"W" # 87 0x0057
+"X" # 88 0x0058
+"Y" # 89 0x0059
+"Z" # 90 0x005a
+"[" # 91 0x005b
+"\\" # 92 0x005c
+"]" # 93 0x005d
+"^" # 94 0x005e
+"_" # 95 0x005f
+"`" # 96 0x0060
+"a" # 97 0x0061
+"b" # 98 0x0062
+"c" # 99 0x0063
+"d" # 100 0x0064
+"e" # 101 0x0065
+"f" # 102 0x0066
+"g" # 103 0x0067
+"h" # 104 0x0068
+"i" # 105 0x0069
+"j" # 106 0x006a
+"k" # 107 0x006b
+"l" # 108 0x006c
+"m" # 109 0x006d
+"n" # 110 0x006e
+"o" # 111 0x006f
+"p" # 112 0x0070
+"q" # 113 0x0071
+"r" # 114 0x0072
+"s" # 115 0x0073
+"t" # 116 0x0074
+"u" # 117 0x0075
+"v" # 118 0x0076
+"w" # 119 0x0077
+"x" # 120 0x0078
+"y" # 121 0x0079
+"z" # 122 0x007a
+"{" # 123 0x007b
+"|" # 124 0x007c
+"}" # 125 0x007d
+"~" # 126 0x007e
+"\x7f" # 127 0x007f
+"Û" # 128 0x00db
+"Ù" # 129 0x00d9
+"Ú" # 130 0x00da
+"Ü" # 131 0x00dc
+"û" # 132 0x00fb
+"ù" # 133 0x00f9
+"ú" # 134 0x00fa
+"Ô" # 135 0x00d4
+"Ò" # 136 0x00d2
+"Ó" # 137 0x00d3
+"°" # 138 0x00b0
+"ô" # 139 0x00f4
+"ò" # 140 0x00f2
+"ó" # 141 0x00f3
+"ö" # 142 0x00f6
+"¿" # 143 0x00bf
+"Ê" # 144 0x00ca
+"È" # 145 0x00c8
+"É" # 146 0x00c9
+"Ë" # 147 0x00cb
+"ê" # 148 0x00ea
+"è" # 149 0x00e8
+"é" # 150 0x00e9
+"ë" # 151 0x00eb
+"Å" # 152 0x00c5
+"Ä" # 153 0x00c4
+"å" # 154 0x00e5
+"â" # 155 0x00e2
+"à" # 156 0x00e0
+"á" # 157 0x00e1
+"ä" # 158 0x00e4
+"ª" # 159 0x00aa
+"ª" # 160 0x00aa
+"î" # 161 0x00ee
+"ì" # 162 0x00ec
+"í" # 163 0x00ed
+"ï" # 164 0x00ef
+"¡" # 165 0x00a1
+"Ñ" # 166 0x00d1
+"ñ" # 167 0x00f1
+"Ñ" # 168 0x00d1
+" " # 169 0x0020
+" " # 170 0x0020
+" " # 171 0x0020
+" " # 172 0x0020
+" " # 173 0x0020
+" " # 174 0x0020
+"Æ" # 175 0x00c6
+"§" # 176 0x00a7
+"±" # 177 0x00b1
+" " # 178 0x0020
+" " # 179 0x0020
+" " # 180 0x0020
+" " # 181 0x0020
+"\x83" # 182 0x0083
+"£" # 183 0x00a3
+" " # 184 0x0020
+" " # 185 0x0020
+" " # 186 0x0020
+" " # 187 0x0020
+"¶" # 188 0x00b6
+"½" # 189 0x00bd
+" " # 190 0x0020
+"¼" # 191 0x00bc
+"ø" # 192 0x00f8
+" " # 193 0x0020
+"Ð" # 194 0x00d0
+"ß" # 195 0x00df
+"ç" # 196 0x00e7
+"®" # 197 0x00ae
+" " # 198 0x0020
+" " # 199 0x0020
+"µ" # 200 0x00b5
+"ø" # 201 0x00f8
+"ÿ" # 202 0x00ff
+"Ã" # 203 0x00c3
+"¢" # 204 0x00a2
+"ã" # 205 0x00e3
+"Õ" # 206 0x00d5
+"õ" # 207 0x00f5
+"·" # 208 0x00b7
+"¨" # 209 0x00a8
+"°" # 210 0x00b0
+" " # 211 0x0020
+"´" # 212 0x00b4
+"~" # 213 0x007e
+"÷" # 214 0x00f7
+"«" # 215 0x00ab
+"»" # 216 0x00bb
+" " # 217 0x0020
+"\\" # 218 0x005c
+"×" # 219 0x00d7
+"®" # 220 0x00ae
+"©" # 221 0x00a9
+" " # 222 0x0020
+" " # 223 0x0020
+" " # 224 0x0020
+" " # 225 0x0020
+" " # 226 0x0020
+" " # 227 0x0020
+" " # 228 0x0020
+" " # 229 0x0020
+" " # 230 0x0020
+" " # 231 0x0020
+" " # 232 0x0020
+" " # 233 0x0020
+" " # 234 0x0020
+" " # 235 0x0020
+" " # 236 0x0020
+" " # 237 0x0020
+" " # 238 0x0020
+" " # 239 0x0020
+" " # 240 0x0020
+" " # 241 0x0020
+" " # 242 0x0020
+" " # 243 0x0020
+" " # 244 0x0020
+" " # 245 0x0020
+" " # 246 0x0020
+" " # 247 0x0020
+" " # 248 0x0020
+" " # 249 0x0020
+" " # 250 0x0020
+" " # 251 0x0020
+" " # 252 0x0020
+" " # 253 0x0020
+" " # 254 0x0020
+" " # 255 0x0020
+)
diff --git a/paradox/lib/encodings/charmaps/hu.py b/paradox/lib/encodings/charmaps/hu.py
new file mode 100644
index 00000000..2db26ea5
--- /dev/null
+++ b/paradox/lib/encodings/charmaps/hu.py
@@ -0,0 +1,259 @@
+# paradox encoding paradox-hu
+charmap = (
+"\x00" # 0 0x0000
+"Á" # 1 0x00c1
+"Ű" # 2 0x0170
+"Ő" # 3 0x0150
+"ő" # 4 0x0151
+" " # 5 0x0020
+" " # 6 0x0020
+" " # 7 0x0020
+" " # 8 0x0020
+" " # 9 0x0020
+" " # 10 0x0020
+" " # 11 0x0020
+" " # 12 0x0020
+" " # 13 0x0020
+" " # 14 0x0020
+" " # 15 0x0020
+" " # 16 0x0020
+" " # 17 0x0020
+" " # 18 0x0020
+" " # 19 0x0020
+" " # 20 0x0020
+" " # 21 0x0020
+" " # 22 0x0020
+" " # 23 0x0020
+" " # 24 0x0020
+" " # 25 0x0020
+" " # 26 0x0020
+" " # 27 0x0020
+" " # 28 0x0020
+" " # 29 0x0020
+" " # 30 0x0020
+" " # 31 0x0020
+" " # 32 0x0020
+"!" # 33 0x0021
+"\"" # 34 0x0022
+"#" # 35 0x0023
+"$" # 36 0x0024
+"%" # 37 0x0025
+"&" # 38 0x0026
+"'" # 39 0x0027
+"(" # 40 0x0028
+")" # 41 0x0029
+"*" # 42 0x002a
+"+" # 43 0x002b
+"," # 44 0x002c
+"-" # 45 0x002d
+"." # 46 0x002e
+"/" # 47 0x002f
+"0" # 48 0x0030
+"1" # 49 0x0031
+"2" # 50 0x0032
+"3" # 51 0x0033
+"4" # 52 0x0034
+"5" # 53 0x0035
+"6" # 54 0x0036
+"7" # 55 0x0037
+"8" # 56 0x0038
+"9" # 57 0x0039
+":" # 58 0x003a
+";" # 59 0x003b
+"<" # 60 0x003c
+"=" # 61 0x003d
+">" # 62 0x003e
+"?" # 63 0x003f
+"@" # 64 0x0040
+"A" # 65 0x0041
+"B" # 66 0x0042
+"C" # 67 0x0043
+"D" # 68 0x0044
+"E" # 69 0x0045
+"F" # 70 0x0046
+"G" # 71 0x0047
+"H" # 72 0x0048
+"I" # 73 0x0049
+"J" # 74 0x004a
+"K" # 75 0x004b
+"L" # 76 0x004c
+"M" # 77 0x004d
+"N" # 78 0x004e
+"O" # 79 0x004f
+"P" # 80 0x0050
+"Q" # 81 0x0051
+"R" # 82 0x0052
+"S" # 83 0x0053
+"T" # 84 0x0054
+"U" # 85 0x0055
+"V" # 86 0x0056
+"W" # 87 0x0057
+"X" # 88 0x0058
+"Y" # 89 0x0059
+"Z" # 90 0x005a
+"[" # 91 0x005b
+"\\" # 92 0x005c
+"]" # 93 0x005d
+"^" # 94 0x005e
+"_" # 95 0x005f
+"`" # 96 0x0060
+"a" # 97 0x0061
+"b" # 98 0x0062
+"c" # 99 0x0063
+"d" # 100 0x0064
+"e" # 101 0x0065
+"f" # 102 0x0066
+"g" # 103 0x0067
+"h" # 104 0x0068
+"i" # 105 0x0069
+"j" # 106 0x006a
+"k" # 107 0x006b
+"l" # 108 0x006c
+"m" # 109 0x006d
+"n" # 110 0x006e
+"o" # 111 0x006f
+"p" # 112 0x0070
+"q" # 113 0x0071
+"r" # 114 0x0072
+"s" # 115 0x0073
+"t" # 116 0x0074
+"u" # 117 0x0075
+"v" # 118 0x0076
+"w" # 119 0x0077
+"x" # 120 0x0078
+"y" # 121 0x0079
+"z" # 122 0x007a
+"{" # 123 0x007b
+"|" # 124 0x007c
+"}" # 125 0x007d
+"~" # 126 0x007e
+"\x7f" # 127 0x007f
+"Û" # 128 0x00db
+"Ù" # 129 0x00d9
+"Ú" # 130 0x00da
+"Ü" # 131 0x00dc
+"û" # 132 0x00fb
+"ù" # 133 0x00f9
+"ú" # 134 0x00fa
+"Ô" # 135 0x00d4
+"Ò" # 136 0x00d2
+"Ó" # 137 0x00d3
+"°" # 138 0x00b0
+"ô" # 139 0x00f4
+"ò" # 140 0x00f2
+"ó" # 141 0x00f3
+"ö" # 142 0x00f6
+"¿" # 143 0x00bf
+"Ê" # 144 0x00ca
+"È" # 145 0x00c8
+"É" # 146 0x00c9
+"Ë" # 147 0x00cb
+"ê" # 148 0x00ea
+"è" # 149 0x00e8
+"é" # 150 0x00e9
+"ë" # 151 0x00eb
+"Å" # 152 0x00c5
+"Ä" # 153 0x00c4
+"å" # 154 0x00e5
+"â" # 155 0x00e2
+"à" # 156 0x00e0
+"á" # 157 0x00e1
+"ä" # 158 0x00e4
+"ª" # 159 0x00aa
+"ª" # 160 0x00aa
+"î" # 161 0x00ee
+"ì" # 162 0x00ec
+"í" # 163 0x00ed
+"ï" # 164 0x00ef
+"¡" # 165 0x00a1
+"Ñ" # 166 0x00d1
+"ñ" # 167 0x00f1
+"Ñ" # 168 0x00d1
+" " # 169 0x0020
+" " # 170 0x0020
+" " # 171 0x0020
+" " # 172 0x0020
+" " # 173 0x0020
+" " # 174 0x0020
+"Æ" # 175 0x00c6
+"§" # 176 0x00a7
+"±" # 177 0x00b1
+" " # 178 0x0020
+" " # 179 0x0020
+" " # 180 0x0020
+" " # 181 0x0020
+"\x83" # 182 0x0083
+"£" # 183 0x00a3
+" " # 184 0x0020
+" " # 185 0x0020
+" " # 186 0x0020
+" " # 187 0x0020
+"¶" # 188 0x00b6
+"½" # 189 0x00bd
+" " # 190 0x0020
+"¼" # 191 0x00bc
+"ø" # 192 0x00f8
+" " # 193 0x0020
+"Ð" # 194 0x00d0
+"ß" # 195 0x00df
+"ç" # 196 0x00e7
+"®" # 197 0x00ae
+" " # 198 0x0020
+" " # 199 0x0020
+"µ" # 200 0x00b5
+"ø" # 201 0x00f8
+"ÿ" # 202 0x00ff
+"Ã" # 203 0x00c3
+"¢" # 204 0x00a2
+"ã" # 205 0x00e3
+"Õ" # 206 0x00d5
+"õ" # 207 0x00f5
+"·" # 208 0x00b7
+"¨" # 209 0x00a8
+"°" # 210 0x00b0
+" " # 211 0x0020
+"´" # 212 0x00b4
+"~" # 213 0x007e
+"÷" # 214 0x00f7
+"«" # 215 0x00ab
+"»" # 216 0x00bb
+" " # 217 0x0020
+"\\" # 218 0x005c
+"×" # 219 0x00d7
+"®" # 220 0x00ae
+"©" # 221 0x00a9
+" " # 222 0x0020
+" " # 223 0x0020
+" " # 224 0x0020
+" " # 225 0x0020
+" " # 226 0x0020
+" " # 227 0x0020
+" " # 228 0x0020
+" " # 229 0x0020
+" " # 230 0x0020
+" " # 231 0x0020
+" " # 232 0x0020
+" " # 233 0x0020
+" " # 234 0x0020
+" " # 235 0x0020
+" " # 236 0x0020
+" " # 237 0x0020
+" " # 238 0x0020
+" " # 239 0x0020
+" " # 240 0x0020
+" " # 241 0x0020
+" " # 242 0x0020
+" " # 243 0x0020
+" " # 244 0x0020
+" " # 245 0x0020
+" " # 246 0x0020
+" " # 247 0x0020
+" " # 248 0x0020
+" " # 249 0x0020
+" " # 250 0x0020
+" " # 251 0x0020
+" " # 252 0x0020
+" " # 253 0x0020
+" " # 254 0x0020
+" " # 255 0x0020
+)
diff --git a/paradox/lib/encodings/charmaps/pl.py b/paradox/lib/encodings/charmaps/pl.py
new file mode 100644
index 00000000..3d012d5a
--- /dev/null
+++ b/paradox/lib/encodings/charmaps/pl.py
@@ -0,0 +1,259 @@
+# paradox encoding paradox-pl
+charmap = (
+"\x00" # 0 0x0000
+"ż" # 1 0x017c
+"ć" # 2 0x0107
+"ą" # 3 0x0105
+"ę" # 4 0x0119
+"ź" # 5 0x017a
+"ł" # 6 0x0142
+"ś" # 7 0x015b
+" " # 8 0x0020
+" " # 9 0x0020
+" " # 10 0x0020
+" " # 11 0x0020
+" " # 12 0x0020
+" " # 13 0x0020
+" " # 14 0x0020
+" " # 15 0x0020
+" " # 16 0x0020
+" " # 17 0x0020
+" " # 18 0x0020
+" " # 19 0x0020
+" " # 20 0x0020
+" " # 21 0x0020
+" " # 22 0x0020
+" " # 23 0x0020
+" " # 24 0x0020
+" " # 25 0x0020
+" " # 26 0x0020
+" " # 27 0x0020
+" " # 28 0x0020
+" " # 29 0x0020
+" " # 30 0x0020
+" " # 31 0x0020
+" " # 32 0x0020
+"!" # 33 0x0021
+"\"" # 34 0x0022
+"#" # 35 0x0023
+"$" # 36 0x0024
+"%" # 37 0x0025
+"&" # 38 0x0026
+"'" # 39 0x0027
+"(" # 40 0x0028
+")" # 41 0x0029
+"*" # 42 0x002a
+"+" # 43 0x002b
+"," # 44 0x002c
+"-" # 45 0x002d
+"." # 46 0x002e
+"/" # 47 0x002f
+"0" # 48 0x0030
+"1" # 49 0x0031
+"2" # 50 0x0032
+"3" # 51 0x0033
+"4" # 52 0x0034
+"5" # 53 0x0035
+"6" # 54 0x0036
+"7" # 55 0x0037
+"8" # 56 0x0038
+"9" # 57 0x0039
+":" # 58 0x003a
+";" # 59 0x003b
+"<" # 60 0x003c
+"=" # 61 0x003d
+">" # 62 0x003e
+"?" # 63 0x003f
+"@" # 64 0x0040
+"A" # 65 0x0041
+"B" # 66 0x0042
+"C" # 67 0x0043
+"D" # 68 0x0044
+"E" # 69 0x0045
+"F" # 70 0x0046
+"G" # 71 0x0047
+"H" # 72 0x0048
+"I" # 73 0x0049
+"J" # 74 0x004a
+"K" # 75 0x004b
+"L" # 76 0x004c
+"M" # 77 0x004d
+"N" # 78 0x004e
+"O" # 79 0x004f
+"P" # 80 0x0050
+"Q" # 81 0x0051
+"R" # 82 0x0052
+"S" # 83 0x0053
+"T" # 84 0x0054
+"U" # 85 0x0055
+"V" # 86 0x0056
+"W" # 87 0x0057
+"X" # 88 0x0058
+"Y" # 89 0x0059
+"Z" # 90 0x005a
+"[" # 91 0x005b
+"\\" # 92 0x005c
+"]" # 93 0x005d
+"^" # 94 0x005e
+"_" # 95 0x005f
+"`" # 96 0x0060
+"a" # 97 0x0061
+"b" # 98 0x0062
+"c" # 99 0x0063
+"d" # 100 0x0064
+"e" # 101 0x0065
+"f" # 102 0x0066
+"g" # 103 0x0067
+"h" # 104 0x0068
+"i" # 105 0x0069
+"j" # 106 0x006a
+"k" # 107 0x006b
+"l" # 108 0x006c
+"m" # 109 0x006d
+"n" # 110 0x006e
+"o" # 111 0x006f
+"p" # 112 0x0070
+"q" # 113 0x0071
+"r" # 114 0x0072
+"s" # 115 0x0073
+"t" # 116 0x0074
+"u" # 117 0x0075
+"v" # 118 0x0076
+"w" # 119 0x0077
+"x" # 120 0x0078
+"y" # 121 0x0079
+"z" # 122 0x007a
+"{" # 123 0x007b
+"|" # 124 0x007c
+"}" # 125 0x007d
+"~" # 126 0x007e
+"\x7f" # 127 0x007f
+"Û" # 128 0x00db
+"Ù" # 129 0x00d9
+"Ú" # 130 0x00da
+"Ü" # 131 0x00dc
+"û" # 132 0x00fb
+"ù" # 133 0x00f9
+"ú" # 134 0x00fa
+"Ô" # 135 0x00d4
+"Ò" # 136 0x00d2
+"Ó" # 137 0x00d3
+"°" # 138 0x00b0
+"ô" # 139 0x00f4
+"ò" # 140 0x00f2
+"ó" # 141 0x00f3
+"ö" # 142 0x00f6
+"¿" # 143 0x00bf
+"Ê" # 144 0x00ca
+"È" # 145 0x00c8
+"É" # 146 0x00c9
+"Ë" # 147 0x00cb
+"ê" # 148 0x00ea
+"è" # 149 0x00e8
+"é" # 150 0x00e9
+"ë" # 151 0x00eb
+"Å" # 152 0x00c5
+"Ä" # 153 0x00c4
+"å" # 154 0x00e5
+"â" # 155 0x00e2
+"à" # 156 0x00e0
+"á" # 157 0x00e1
+"ä" # 158 0x00e4
+"ª" # 159 0x00aa
+"ª" # 160 0x00aa
+"î" # 161 0x00ee
+"ì" # 162 0x00ec
+"í" # 163 0x00ed
+"ï" # 164 0x00ef
+"¡" # 165 0x00a1
+"Ñ" # 166 0x00d1
+"ñ" # 167 0x00f1
+"Ñ" # 168 0x00d1
+" " # 169 0x0020
+" " # 170 0x0020
+" " # 171 0x0020
+" " # 172 0x0020
+" " # 173 0x0020
+" " # 174 0x0020
+"Æ" # 175 0x00c6
+"§" # 176 0x00a7
+"±" # 177 0x00b1
+" " # 178 0x0020
+" " # 179 0x0020
+" " # 180 0x0020
+" " # 181 0x0020
+"\x83" # 182 0x0083
+"£" # 183 0x00a3
+" " # 184 0x0020
+" " # 185 0x0020
+" " # 186 0x0020
+" " # 187 0x0020
+"¶" # 188 0x00b6
+"½" # 189 0x00bd
+" " # 190 0x0020
+"¼" # 191 0x00bc
+"ø" # 192 0x00f8
+" " # 193 0x0020
+"Ð" # 194 0x00d0
+"ß" # 195 0x00df
+"ç" # 196 0x00e7
+"®" # 197 0x00ae
+" " # 198 0x0020
+" " # 199 0x0020
+"µ" # 200 0x00b5
+"ø" # 201 0x00f8
+"ÿ" # 202 0x00ff
+"Ã" # 203 0x00c3
+"¢" # 204 0x00a2
+"ã" # 205 0x00e3
+"Õ" # 206 0x00d5
+"õ" # 207 0x00f5
+"·" # 208 0x00b7
+"¨" # 209 0x00a8
+"°" # 210 0x00b0
+" " # 211 0x0020
+"´" # 212 0x00b4
+"~" # 213 0x007e
+"÷" # 214 0x00f7
+"«" # 215 0x00ab
+"»" # 216 0x00bb
+" " # 217 0x0020
+"\\" # 218 0x005c
+"×" # 219 0x00d7
+"®" # 220 0x00ae
+"©" # 221 0x00a9
+" " # 222 0x0020
+" " # 223 0x0020
+" " # 224 0x0020
+" " # 225 0x0020
+" " # 226 0x0020
+" " # 227 0x0020
+" " # 228 0x0020
+" " # 229 0x0020
+" " # 230 0x0020
+" " # 231 0x0020
+" " # 232 0x0020
+" " # 233 0x0020
+" " # 234 0x0020
+" " # 235 0x0020
+" " # 236 0x0020
+" " # 237 0x0020
+" " # 238 0x0020
+" " # 239 0x0020
+" " # 240 0x0020
+" " # 241 0x0020
+" " # 242 0x0020
+" " # 243 0x0020
+" " # 244 0x0020
+" " # 245 0x0020
+" " # 246 0x0020
+" " # 247 0x0020
+" " # 248 0x0020
+" " # 249 0x0020
+" " # 250 0x0020
+" " # 251 0x0020
+" " # 252 0x0020
+" " # 253 0x0020
+" " # 254 0x0020
+" " # 255 0x0020
+)
diff --git a/paradox/lib/encodings/charmaps/pt.py b/paradox/lib/encodings/charmaps/pt.py
new file mode 100644
index 00000000..2d4d52e7
--- /dev/null
+++ b/paradox/lib/encodings/charmaps/pt.py
@@ -0,0 +1,259 @@
+# paradox encoding paradox-pt
+charmap = (
+"\x00" # 0 0x0000
+"ã" # 1 0x00e3
+" " # 2 0x0020
+" " # 3 0x0020
+" " # 4 0x0020
+" " # 5 0x0020
+" " # 6 0x0020
+" " # 7 0x0020
+" " # 8 0x0020
+" " # 9 0x0020
+" " # 10 0x0020
+" " # 11 0x0020
+" " # 12 0x0020
+" " # 13 0x0020
+" " # 14 0x0020
+" " # 15 0x0020
+" " # 16 0x0020
+" " # 17 0x0020
+" " # 18 0x0020
+" " # 19 0x0020
+" " # 20 0x0020
+" " # 21 0x0020
+" " # 22 0x0020
+" " # 23 0x0020
+" " # 24 0x0020
+" " # 25 0x0020
+" " # 26 0x0020
+" " # 27 0x0020
+" " # 28 0x0020
+" " # 29 0x0020
+" " # 30 0x0020
+" " # 31 0x0020
+" " # 32 0x0020
+"!" # 33 0x0021
+"\"" # 34 0x0022
+"#" # 35 0x0023
+"$" # 36 0x0024
+"%" # 37 0x0025
+"&" # 38 0x0026
+"'" # 39 0x0027
+"(" # 40 0x0028
+")" # 41 0x0029
+"*" # 42 0x002a
+"+" # 43 0x002b
+"," # 44 0x002c
+"-" # 45 0x002d
+"." # 46 0x002e
+"/" # 47 0x002f
+"0" # 48 0x0030
+"1" # 49 0x0031
+"2" # 50 0x0032
+"3" # 51 0x0033
+"4" # 52 0x0034
+"5" # 53 0x0035
+"6" # 54 0x0036
+"7" # 55 0x0037
+"8" # 56 0x0038
+"9" # 57 0x0039
+":" # 58 0x003a
+";" # 59 0x003b
+"<" # 60 0x003c
+"=" # 61 0x003d
+">" # 62 0x003e
+"?" # 63 0x003f
+"@" # 64 0x0040
+"A" # 65 0x0041
+"B" # 66 0x0042
+"C" # 67 0x0043
+"D" # 68 0x0044
+"E" # 69 0x0045
+"F" # 70 0x0046
+"G" # 71 0x0047
+"H" # 72 0x0048
+"I" # 73 0x0049
+"J" # 74 0x004a
+"K" # 75 0x004b
+"L" # 76 0x004c
+"M" # 77 0x004d
+"N" # 78 0x004e
+"O" # 79 0x004f
+"P" # 80 0x0050
+"Q" # 81 0x0051
+"R" # 82 0x0052
+"S" # 83 0x0053
+"T" # 84 0x0054
+"U" # 85 0x0055
+"V" # 86 0x0056
+"W" # 87 0x0057
+"X" # 88 0x0058
+"Y" # 89 0x0059
+"Z" # 90 0x005a
+"[" # 91 0x005b
+"\\" # 92 0x005c
+"]" # 93 0x005d
+"^" # 94 0x005e
+"_" # 95 0x005f
+"`" # 96 0x0060
+"a" # 97 0x0061
+"b" # 98 0x0062
+"c" # 99 0x0063
+"d" # 100 0x0064
+"e" # 101 0x0065
+"f" # 102 0x0066
+"g" # 103 0x0067
+"h" # 104 0x0068
+"i" # 105 0x0069
+"j" # 106 0x006a
+"k" # 107 0x006b
+"l" # 108 0x006c
+"m" # 109 0x006d
+"n" # 110 0x006e
+"o" # 111 0x006f
+"p" # 112 0x0070
+"q" # 113 0x0071
+"r" # 114 0x0072
+"s" # 115 0x0073
+"t" # 116 0x0074
+"u" # 117 0x0075
+"v" # 118 0x0076
+"w" # 119 0x0077
+"x" # 120 0x0078
+"y" # 121 0x0079
+"z" # 122 0x007a
+"{" # 123 0x007b
+"|" # 124 0x007c
+"}" # 125 0x007d
+"~" # 126 0x007e
+"\x7f" # 127 0x007f
+"Û" # 128 0x00db
+"Ù" # 129 0x00d9
+"Ú" # 130 0x00da
+"Ü" # 131 0x00dc
+"û" # 132 0x00fb
+"ù" # 133 0x00f9
+"ú" # 134 0x00fa
+"Ô" # 135 0x00d4
+"Ò" # 136 0x00d2
+"Ó" # 137 0x00d3
+"°" # 138 0x00b0
+"ô" # 139 0x00f4
+"ò" # 140 0x00f2
+"ó" # 141 0x00f3
+"ö" # 142 0x00f6
+"¿" # 143 0x00bf
+"Ê" # 144 0x00ca
+"È" # 145 0x00c8
+"É" # 146 0x00c9
+"Ë" # 147 0x00cb
+"ê" # 148 0x00ea
+"è" # 149 0x00e8
+"é" # 150 0x00e9
+"ë" # 151 0x00eb
+"Å" # 152 0x00c5
+"Ä" # 153 0x00c4
+"å" # 154 0x00e5
+"â" # 155 0x00e2
+"à" # 156 0x00e0
+"á" # 157 0x00e1
+"ä" # 158 0x00e4
+"ª" # 159 0x00aa
+"ª" # 160 0x00aa
+"î" # 161 0x00ee
+"ì" # 162 0x00ec
+"í" # 163 0x00ed
+"ï" # 164 0x00ef
+"¡" # 165 0x00a1
+"Ñ" # 166 0x00d1
+"ñ" # 167 0x00f1
+"Ñ" # 168 0x00d1
+" " # 169 0x0020
+" " # 170 0x0020
+" " # 171 0x0020
+" " # 172 0x0020
+" " # 173 0x0020
+" " # 174 0x0020
+"Æ" # 175 0x00c6
+"§" # 176 0x00a7
+"±" # 177 0x00b1
+" " # 178 0x0020
+" " # 179 0x0020
+" " # 180 0x0020
+" " # 181 0x0020
+"\x83" # 182 0x0083
+"£" # 183 0x00a3
+" " # 184 0x0020
+" " # 185 0x0020
+" " # 186 0x0020
+" " # 187 0x0020
+"¶" # 188 0x00b6
+"½" # 189 0x00bd
+" " # 190 0x0020
+"¼" # 191 0x00bc
+"ø" # 192 0x00f8
+" " # 193 0x0020
+"Ð" # 194 0x00d0
+"ß" # 195 0x00df
+"ç" # 196 0x00e7
+"®" # 197 0x00ae
+" " # 198 0x0020
+" " # 199 0x0020
+"µ" # 200 0x00b5
+"ø" # 201 0x00f8
+"ÿ" # 202 0x00ff
+"Ã" # 203 0x00c3
+"¢" # 204 0x00a2
+"ã" # 205 0x00e3
+"Õ" # 206 0x00d5
+"õ" # 207 0x00f5
+"·" # 208 0x00b7
+"¨" # 209 0x00a8
+"°" # 210 0x00b0
+" " # 211 0x0020
+"´" # 212 0x00b4
+"~" # 213 0x007e
+"÷" # 214 0x00f7
+"«" # 215 0x00ab
+"»" # 216 0x00bb
+" " # 217 0x0020
+"\\" # 218 0x005c
+"×" # 219 0x00d7
+"®" # 220 0x00ae
+"©" # 221 0x00a9
+" " # 222 0x0020
+" " # 223 0x0020
+" " # 224 0x0020
+" " # 225 0x0020
+" " # 226 0x0020
+" " # 227 0x0020
+" " # 228 0x0020
+" " # 229 0x0020
+" " # 230 0x0020
+" " # 231 0x0020
+" " # 232 0x0020
+" " # 233 0x0020
+" " # 234 0x0020
+" " # 235 0x0020
+" " # 236 0x0020
+" " # 237 0x0020
+" " # 238 0x0020
+" " # 239 0x0020
+" " # 240 0x0020
+" " # 241 0x0020
+" " # 242 0x0020
+" " # 243 0x0020
+" " # 244 0x0020
+" " # 245 0x0020
+" " # 246 0x0020
+" " # 247 0x0020
+" " # 248 0x0020
+" " # 249 0x0020
+" " # 250 0x0020
+" " # 251 0x0020
+" " # 252 0x0020
+" " # 253 0x0020
+" " # 254 0x0020
+" " # 255 0x0020
+)
diff --git a/paradox/lib/encodings/charmaps/ro.py b/paradox/lib/encodings/charmaps/ro.py
new file mode 100644
index 00000000..6ac7a9ec
--- /dev/null
+++ b/paradox/lib/encodings/charmaps/ro.py
@@ -0,0 +1,259 @@
+# paradox encoding paradox-ro
+charmap = (
+"\x00" # 0 0x0000
+"ă" # 1 0x0103
+"ș" # 2 0x0219
+"ț" # 3 0x021b
+" " # 4 0x0020
+" " # 5 0x0020
+" " # 6 0x0020
+" " # 7 0x0020
+" " # 8 0x0020
+" " # 9 0x0020
+" " # 10 0x0020
+" " # 11 0x0020
+" " # 12 0x0020
+" " # 13 0x0020
+" " # 14 0x0020
+" " # 15 0x0020
+" " # 16 0x0020
+" " # 17 0x0020
+" " # 18 0x0020
+" " # 19 0x0020
+" " # 20 0x0020
+" " # 21 0x0020
+" " # 22 0x0020
+" " # 23 0x0020
+" " # 24 0x0020
+" " # 25 0x0020
+" " # 26 0x0020
+" " # 27 0x0020
+" " # 28 0x0020
+" " # 29 0x0020
+" " # 30 0x0020
+" " # 31 0x0020
+" " # 32 0x0020
+"!" # 33 0x0021
+"\"" # 34 0x0022
+"#" # 35 0x0023
+"$" # 36 0x0024
+"%" # 37 0x0025
+"&" # 38 0x0026
+"'" # 39 0x0027
+"(" # 40 0x0028
+")" # 41 0x0029
+"*" # 42 0x002a
+"+" # 43 0x002b
+"," # 44 0x002c
+"-" # 45 0x002d
+"." # 46 0x002e
+"/" # 47 0x002f
+"0" # 48 0x0030
+"1" # 49 0x0031
+"2" # 50 0x0032
+"3" # 51 0x0033
+"4" # 52 0x0034
+"5" # 53 0x0035
+"6" # 54 0x0036
+"7" # 55 0x0037
+"8" # 56 0x0038
+"9" # 57 0x0039
+":" # 58 0x003a
+";" # 59 0x003b
+"<" # 60 0x003c
+"=" # 61 0x003d
+">" # 62 0x003e
+"?" # 63 0x003f
+"@" # 64 0x0040
+"A" # 65 0x0041
+"B" # 66 0x0042
+"C" # 67 0x0043
+"D" # 68 0x0044
+"E" # 69 0x0045
+"F" # 70 0x0046
+"G" # 71 0x0047
+"H" # 72 0x0048
+"I" # 73 0x0049
+"J" # 74 0x004a
+"K" # 75 0x004b
+"L" # 76 0x004c
+"M" # 77 0x004d
+"N" # 78 0x004e
+"O" # 79 0x004f
+"P" # 80 0x0050
+"Q" # 81 0x0051
+"R" # 82 0x0052
+"S" # 83 0x0053
+"T" # 84 0x0054
+"U" # 85 0x0055
+"V" # 86 0x0056
+"W" # 87 0x0057
+"X" # 88 0x0058
+"Y" # 89 0x0059
+"Z" # 90 0x005a
+"[" # 91 0x005b
+"\\" # 92 0x005c
+"]" # 93 0x005d
+"^" # 94 0x005e
+"_" # 95 0x005f
+"`" # 96 0x0060
+"a" # 97 0x0061
+"b" # 98 0x0062
+"c" # 99 0x0063
+"d" # 100 0x0064
+"e" # 101 0x0065
+"f" # 102 0x0066
+"g" # 103 0x0067
+"h" # 104 0x0068
+"i" # 105 0x0069
+"j" # 106 0x006a
+"k" # 107 0x006b
+"l" # 108 0x006c
+"m" # 109 0x006d
+"n" # 110 0x006e
+"o" # 111 0x006f
+"p" # 112 0x0070
+"q" # 113 0x0071
+"r" # 114 0x0072
+"s" # 115 0x0073
+"t" # 116 0x0074
+"u" # 117 0x0075
+"v" # 118 0x0076
+"w" # 119 0x0077
+"x" # 120 0x0078
+"y" # 121 0x0079
+"z" # 122 0x007a
+"{" # 123 0x007b
+"|" # 124 0x007c
+"}" # 125 0x007d
+"~" # 126 0x007e
+"\x7f" # 127 0x007f
+"Û" # 128 0x00db
+"Ù" # 129 0x00d9
+"Ú" # 130 0x00da
+"Ü" # 131 0x00dc
+"û" # 132 0x00fb
+"ù" # 133 0x00f9
+"ú" # 134 0x00fa
+"Ô" # 135 0x00d4
+"Ò" # 136 0x00d2
+"Ó" # 137 0x00d3
+"°" # 138 0x00b0
+"ô" # 139 0x00f4
+"ò" # 140 0x00f2
+"ó" # 141 0x00f3
+"ö" # 142 0x00f6
+"¿" # 143 0x00bf
+"Ê" # 144 0x00ca
+"È" # 145 0x00c8
+"É" # 146 0x00c9
+"Ë" # 147 0x00cb
+"ê" # 148 0x00ea
+"è" # 149 0x00e8
+"é" # 150 0x00e9
+"ë" # 151 0x00eb
+"Å" # 152 0x00c5
+"Ä" # 153 0x00c4
+"å" # 154 0x00e5
+"â" # 155 0x00e2
+"à" # 156 0x00e0
+"á" # 157 0x00e1
+"ä" # 158 0x00e4
+"ª" # 159 0x00aa
+"ª" # 160 0x00aa
+"î" # 161 0x00ee
+"ì" # 162 0x00ec
+"í" # 163 0x00ed
+"ï" # 164 0x00ef
+"¡" # 165 0x00a1
+"Ñ" # 166 0x00d1
+"ñ" # 167 0x00f1
+"Ñ" # 168 0x00d1
+" " # 169 0x0020
+" " # 170 0x0020
+" " # 171 0x0020
+" " # 172 0x0020
+" " # 173 0x0020
+" " # 174 0x0020
+"Æ" # 175 0x00c6
+"§" # 176 0x00a7
+"±" # 177 0x00b1
+" " # 178 0x0020
+" " # 179 0x0020
+" " # 180 0x0020
+" " # 181 0x0020
+"\x83" # 182 0x0083
+"£" # 183 0x00a3
+" " # 184 0x0020
+" " # 185 0x0020
+" " # 186 0x0020
+" " # 187 0x0020
+"¶" # 188 0x00b6
+"½" # 189 0x00bd
+" " # 190 0x0020
+"¼" # 191 0x00bc
+"ø" # 192 0x00f8
+" " # 193 0x0020
+"Ð" # 194 0x00d0
+"ß" # 195 0x00df
+"ç" # 196 0x00e7
+"®" # 197 0x00ae
+" " # 198 0x0020
+" " # 199 0x0020
+"µ" # 200 0x00b5
+"ø" # 201 0x00f8
+"ÿ" # 202 0x00ff
+"Ã" # 203 0x00c3
+"¢" # 204 0x00a2
+"ã" # 205 0x00e3
+"Õ" # 206 0x00d5
+"õ" # 207 0x00f5
+"·" # 208 0x00b7
+"¨" # 209 0x00a8
+"°" # 210 0x00b0
+" " # 211 0x0020
+"´" # 212 0x00b4
+"~" # 213 0x007e
+"÷" # 214 0x00f7
+"«" # 215 0x00ab
+"»" # 216 0x00bb
+" " # 217 0x0020
+"\\" # 218 0x005c
+"×" # 219 0x00d7
+"®" # 220 0x00ae
+"©" # 221 0x00a9
+" " # 222 0x0020
+" " # 223 0x0020
+" " # 224 0x0020
+" " # 225 0x0020
+" " # 226 0x0020
+" " # 227 0x0020
+" " # 228 0x0020
+" " # 229 0x0020
+" " # 230 0x0020
+" " # 231 0x0020
+" " # 232 0x0020
+" " # 233 0x0020
+" " # 234 0x0020
+" " # 235 0x0020
+" " # 236 0x0020
+" " # 237 0x0020
+" " # 238 0x0020
+" " # 239 0x0020
+" " # 240 0x0020
+" " # 241 0x0020
+" " # 242 0x0020
+" " # 243 0x0020
+" " # 244 0x0020
+" " # 245 0x0020
+" " # 246 0x0020
+" " # 247 0x0020
+" " # 248 0x0020
+" " # 249 0x0020
+" " # 250 0x0020
+" " # 251 0x0020
+" " # 252 0x0020
+" " # 253 0x0020
+" " # 254 0x0020
+" " # 255 0x0020
+)
diff --git a/paradox/lib/encodings/charmaps/tr.py b/paradox/lib/encodings/charmaps/tr.py
new file mode 100644
index 00000000..5f82c749
--- /dev/null
+++ b/paradox/lib/encodings/charmaps/tr.py
@@ -0,0 +1,259 @@
+# paradox encoding paradox-tr
+charmap = (
+"\x00" # 0 0x0000
+"ü" # 1 0x00fc
+"ı" # 2 0x0131
+" " # 3 0x0020
+" " # 4 0x0020
+" " # 5 0x0020
+" " # 6 0x0020
+" " # 7 0x0020
+" " # 8 0x0020
+" " # 9 0x0020
+" " # 10 0x0020
+" " # 11 0x0020
+" " # 12 0x0020
+" " # 13 0x0020
+" " # 14 0x0020
+" " # 15 0x0020
+" " # 16 0x0020
+" " # 17 0x0020
+" " # 18 0x0020
+" " # 19 0x0020
+" " # 20 0x0020
+" " # 21 0x0020
+" " # 22 0x0020
+" " # 23 0x0020
+" " # 24 0x0020
+" " # 25 0x0020
+" " # 26 0x0020
+" " # 27 0x0020
+" " # 28 0x0020
+" " # 29 0x0020
+" " # 30 0x0020
+" " # 31 0x0020
+" " # 32 0x0020
+"!" # 33 0x0021
+"\"" # 34 0x0022
+"#" # 35 0x0023
+"$" # 36 0x0024
+"%" # 37 0x0025
+"&" # 38 0x0026
+"'" # 39 0x0027
+"(" # 40 0x0028
+")" # 41 0x0029
+"*" # 42 0x002a
+"+" # 43 0x002b
+"," # 44 0x002c
+"-" # 45 0x002d
+"." # 46 0x002e
+"/" # 47 0x002f
+"0" # 48 0x0030
+"1" # 49 0x0031
+"2" # 50 0x0032
+"3" # 51 0x0033
+"4" # 52 0x0034
+"5" # 53 0x0035
+"6" # 54 0x0036
+"7" # 55 0x0037
+"8" # 56 0x0038
+"9" # 57 0x0039
+":" # 58 0x003a
+";" # 59 0x003b
+"<" # 60 0x003c
+"=" # 61 0x003d
+">" # 62 0x003e
+"?" # 63 0x003f
+"@" # 64 0x0040
+"A" # 65 0x0041
+"B" # 66 0x0042
+"C" # 67 0x0043
+"D" # 68 0x0044
+"E" # 69 0x0045
+"F" # 70 0x0046
+"G" # 71 0x0047
+"H" # 72 0x0048
+"I" # 73 0x0049
+"J" # 74 0x004a
+"K" # 75 0x004b
+"L" # 76 0x004c
+"M" # 77 0x004d
+"N" # 78 0x004e
+"O" # 79 0x004f
+"P" # 80 0x0050
+"Q" # 81 0x0051
+"R" # 82 0x0052
+"S" # 83 0x0053
+"T" # 84 0x0054
+"U" # 85 0x0055
+"V" # 86 0x0056
+"W" # 87 0x0057
+"X" # 88 0x0058
+"Y" # 89 0x0059
+"Z" # 90 0x005a
+"[" # 91 0x005b
+"\\" # 92 0x005c
+"]" # 93 0x005d
+"^" # 94 0x005e
+"_" # 95 0x005f
+"`" # 96 0x0060
+"a" # 97 0x0061
+"b" # 98 0x0062
+"c" # 99 0x0063
+"d" # 100 0x0064
+"e" # 101 0x0065
+"f" # 102 0x0066
+"g" # 103 0x0067
+"h" # 104 0x0068
+"i" # 105 0x0069
+"j" # 106 0x006a
+"k" # 107 0x006b
+"l" # 108 0x006c
+"m" # 109 0x006d
+"n" # 110 0x006e
+"o" # 111 0x006f
+"p" # 112 0x0070
+"q" # 113 0x0071
+"r" # 114 0x0072
+"s" # 115 0x0073
+"t" # 116 0x0074
+"u" # 117 0x0075
+"v" # 118 0x0076
+"w" # 119 0x0077
+"x" # 120 0x0078
+"y" # 121 0x0079
+"z" # 122 0x007a
+"{" # 123 0x007b
+"|" # 124 0x007c
+"}" # 125 0x007d
+"~" # 126 0x007e
+"\x7f" # 127 0x007f
+"Û" # 128 0x00db
+"Ù" # 129 0x00d9
+"Ú" # 130 0x00da
+"Ü" # 131 0x00dc
+"û" # 132 0x00fb
+"ù" # 133 0x00f9
+"ú" # 134 0x00fa
+"Ô" # 135 0x00d4
+"Ò" # 136 0x00d2
+"Ó" # 137 0x00d3
+"°" # 138 0x00b0
+"ô" # 139 0x00f4
+"ò" # 140 0x00f2
+"ó" # 141 0x00f3
+"ö" # 142 0x00f6
+"¿" # 143 0x00bf
+"Ê" # 144 0x00ca
+"È" # 145 0x00c8
+"É" # 146 0x00c9
+"Ë" # 147 0x00cb
+"ê" # 148 0x00ea
+"è" # 149 0x00e8
+"é" # 150 0x00e9
+"ë" # 151 0x00eb
+"Å" # 152 0x00c5
+"Ä" # 153 0x00c4
+"å" # 154 0x00e5
+"â" # 155 0x00e2
+"à" # 156 0x00e0
+"á" # 157 0x00e1
+"ä" # 158 0x00e4
+"ª" # 159 0x00aa
+"ª" # 160 0x00aa
+"î" # 161 0x00ee
+"ì" # 162 0x00ec
+"í" # 163 0x00ed
+"ï" # 164 0x00ef
+"¡" # 165 0x00a1
+"Ñ" # 166 0x00d1
+"ñ" # 167 0x00f1
+"Ñ" # 168 0x00d1
+" " # 169 0x0020
+" " # 170 0x0020
+" " # 171 0x0020
+" " # 172 0x0020
+" " # 173 0x0020
+" " # 174 0x0020
+"Æ" # 175 0x00c6
+"§" # 176 0x00a7
+"±" # 177 0x00b1
+" " # 178 0x0020
+" " # 179 0x0020
+" " # 180 0x0020
+" " # 181 0x0020
+"\x83" # 182 0x0083
+"£" # 183 0x00a3
+" " # 184 0x0020
+" " # 185 0x0020
+" " # 186 0x0020
+" " # 187 0x0020
+"¶" # 188 0x00b6
+"½" # 189 0x00bd
+" " # 190 0x0020
+"¼" # 191 0x00bc
+"ø" # 192 0x00f8
+" " # 193 0x0020
+"Ð" # 194 0x00d0
+"ß" # 195 0x00df
+"ç" # 196 0x00e7
+"®" # 197 0x00ae
+" " # 198 0x0020
+" " # 199 0x0020
+"µ" # 200 0x00b5
+"ø" # 201 0x00f8
+"ÿ" # 202 0x00ff
+"Ã" # 203 0x00c3
+"¢" # 204 0x00a2
+"ã" # 205 0x00e3
+"Õ" # 206 0x00d5
+"õ" # 207 0x00f5
+"·" # 208 0x00b7
+"¨" # 209 0x00a8
+"°" # 210 0x00b0
+" " # 211 0x0020
+"´" # 212 0x00b4
+"~" # 213 0x007e
+"÷" # 214 0x00f7
+"«" # 215 0x00ab
+"»" # 216 0x00bb
+" " # 217 0x0020
+"\\" # 218 0x005c
+"×" # 219 0x00d7
+"®" # 220 0x00ae
+"©" # 221 0x00a9
+" " # 222 0x0020
+" " # 223 0x0020
+" " # 224 0x0020
+" " # 225 0x0020
+" " # 226 0x0020
+" " # 227 0x0020
+" " # 228 0x0020
+" " # 229 0x0020
+" " # 230 0x0020
+" " # 231 0x0020
+" " # 232 0x0020
+" " # 233 0x0020
+" " # 234 0x0020
+" " # 235 0x0020
+" " # 236 0x0020
+" " # 237 0x0020
+" " # 238 0x0020
+" " # 239 0x0020
+" " # 240 0x0020
+" " # 241 0x0020
+" " # 242 0x0020
+" " # 243 0x0020
+" " # 244 0x0020
+" " # 245 0x0020
+" " # 246 0x0020
+" " # 247 0x0020
+" " # 248 0x0020
+" " # 249 0x0020
+" " # 250 0x0020
+" " # 251 0x0020
+" " # 252 0x0020
+" " # 253 0x0020
+" " # 254 0x0020
+" " # 255 0x0020
+)
diff --git a/paradox/lib/encodings/en.py b/paradox/lib/encodings/en.py
deleted file mode 100644
index cab25430..00000000
--- a/paradox/lib/encodings/en.py
+++ /dev/null
@@ -1,271 +0,0 @@
-import codecs
-
-
-class Codec(codecs.Codec):
-    def encode(self, input, errors="strict"):
-        return codecs.charmap_encode(input, errors, encoding_table)
-
-    def decode(self, input, errors="strict"):
-        return codecs.charmap_decode(input, errors, decoding_table)
-
-
-class IncrementalEncoder(codecs.IncrementalEncoder):
-    def encode(self, input, final=False):
-        return codecs.charmap_encode(input, self.errors, encoding_table)[0]
-
-
-class IncrementalDecoder(codecs.IncrementalDecoder):
-    def decode(self, input, final=False):
-        return codecs.charmap_decode(input, self.errors, decoding_table)[0]
-
-
-class StreamWriter(Codec, codecs.StreamWriter):
-    pass
-
-
-class StreamReader(Codec, codecs.StreamReader):
-    pass
-
-
-def getregentry():
-    return codecs.CodecInfo(
-        name="paradox-en",
-        encode=Codec().encode,
-        decode=Codec().decode,
-        incrementalencoder=IncrementalEncoder,
-        incrementaldecoder=IncrementalDecoder,
-        streamreader=StreamReader,
-        streamwriter=StreamWriter,
-    )
-
-
-# fmt: off
-### Decoding Table
-decoding_table = (
-    "\x00"  # 0    0x00 -> NULL
-    "\x01"  # 1    0x01 -> START OF HEADING
-    "\x02"  # 2    0x02 -> START OF TEXT
-    "\x03"  # 3    0x03 -> END OF TEXT
-    "\x04"  # 4    0x04 -> END OF TRANSMISSION
-    "\x05"  # 5    0x05 -> ENQUIRY
-    "\x06"  # 6    0x06 -> ACKNOWLEDGE
-    "\x07"  # 7    0x07 -> BELL
-    "\x08"  # 8    0x08 -> BACKSPACE
-    "\t"    # 9    0x09 -> HORIZONTAL TABULATION
-    "\n"    # 10   0x0A -> LINE FEED
-    "\x0b"  # 11   0x0B -> VERTICAL TABULATION
-    "\x0c"  # 12   0x0C -> FORM FEED
-    "\r"    # 13   0x0D -> CARRIAGE RETURN
-    "\x0e"  # 14   0x0E -> SHIFT OUT
-    "\x0f"  # 15   0x0F -> SHIFT IN
-    "\x10"  # 16   0x10 -> DATA LINK ESCAPE
-    "\x11"  # 17   0x11 -> DEVICE CONTROL ONE
-    "\x12"  # 18   0x12 -> DEVICE CONTROL TWO
-    "\x13"  # 19   0x13 -> DEVICE CONTROL THREE
-    "\x14"  # 20   0x14 -> DEVICE CONTROL FOUR
-    "\x15"  # 21   0x15 -> NEGATIVE ACKNOWLEDGE
-    "\x16"  # 22   0x16 -> SYNCHRONOUS IDLE
-    "\x17"  # 23   0x17 -> END OF TRANSMISSION BLOCK
-    "\x18"  # 24   0x18 -> CANCEL
-    "\x19"  # 25   0x19 -> END OF MEDIUM
-    "\x1a"  # 26   0x1A -> SUBSTITUTE
-    "\x1b"  # 27   0x1B -> ESCAPE
-    "\x1c"  # 28   0x1C -> FILE SEPARATOR
-    "\x1d"  # 29   0x1D -> GROUP SEPARATOR
-    "\x1e"  # 30   0x1E -> RECORD SEPARATOR
-    "\x1f"  # 31   0x1F -> UNIT SEPARATOR
-    " "  # 32   0x20 -> SPACE
-    "!"  # 33   0x21 -> EXCLAMATION MARK
-    '"'  # 34   0x22 -> QUOTATION MARK
-    "#"  # 35 0x23 -> NUMBER SIGN
-    "$"  # 36   0x24 -> DOLLAR SIGN
-    "%"  # 37   0x25 -> PERCENT SIGN
-    "&"  # 38   0x26 -> AMPERSAND
-    "'"  # 39   0x27 -> APOSTROPHE
-    "("  # 40   0x28 -> LEFT PARENTHESIS
-    ")"  # 41   0x29 -> RIGHT PARENTHESIS
-    "*"  # 42   0x2A -> ASTERISK
-    "+"  # 43   0x2B -> PLUS SIGN
-    ","   # 44   0x2C -> COMMA
-    "-"  # 45   0x2D -> HYPHEN-MINUS
-    "."  # 46   0x2E -> FULL STOP
-    "/"  # 47   0x2F -> SOLIDUS
-    "0"  # 48   0x30 -> DIGIT ZERO
-    "1"  # 49   0x31 -> DIGIT ONE
-    "2"  # 50   0x32 -> DIGIT TWO
-    "3"  # 51   0x33 -> DIGIT THREE
-    "4"  # 52   0x34 -> DIGIT FOUR
-    "5"  # 53   0x35 -> DIGIT FIVE
-    "6"  # 54   0x36 -> DIGIT SIX
-    "7"  # 55   0x37 -> DIGIT SEVEN
-    "8"  # 56   0x38 -> DIGIT EIGHT
-    "9"  # 57   0x39 -> DIGIT NINE
-    ":"  # 58   0x3A -> COLON
-    ";"  # 59   0x3B -> SEMICOLON
-    "<"  # 60   0x3C -> LESS-THAN SIGN
-    "="  # 61   0x3D -> EQUALS SIGN
-    ">"  # 62   0x3E -> GREATER-THAN SIGN
-    "?"  # 63   0x3F -> QUESTION MARK
-    "@"  # 64   0x40 -> COMMERCIAL AT
-    "A"  # 65   0x41 -> LATIN CAPITAL LETTER A
-    "B"  # 66   0x42 -> LATIN CAPITAL LETTER B
-    "C"  # 67   0x43 -> LATIN CAPITAL LETTER C
-    "D"  # 68   0x44 -> LATIN CAPITAL LETTER D
-    "E"  # 69   0x45 -> LATIN CAPITAL LETTER E
-    "F"  # 70   0x46 -> LATIN CAPITAL LETTER F
-    "G"  # 71   0x47 -> LATIN CAPITAL LETTER G
-    "H"  # 72   0x48 -> LATIN CAPITAL LETTER H
-    "I"  # 73   0x49 -> LATIN CAPITAL LETTER I
-    "J"  # 74   0x4A -> LATIN CAPITAL LETTER J
-    "K"  # 75   0x4B -> LATIN CAPITAL LETTER K
-    "L"  # 76   0x4C -> LATIN CAPITAL LETTER L
-    "M"  # 77   0x4D -> LATIN CAPITAL LETTER M
-    "N"  # 78   0x4E -> LATIN CAPITAL LETTER N
-    "O"  # 79   0x4F -> LATIN CAPITAL LETTER O
-    "P"  # 80   0x50 -> LATIN CAPITAL LETTER P
-    "Q"  # 81   0x51 -> LATIN CAPITAL LETTER Q
-    "R"  # 82   0x52 -> LATIN CAPITAL LETTER R
-    "S"  # 83   0x53 -> LATIN CAPITAL LETTER S
-    "T"  # 84   0x54 -> LATIN CAPITAL LETTER T
-    "U"  # 85   0x55 -> LATIN CAPITAL LETTER U
-    "V"  # 86   0x56 -> LATIN CAPITAL LETTER V
-    "W"  # 87   0x57 -> LATIN CAPITAL LETTER W
-    "X"  # 88   0x58 -> LATIN CAPITAL LETTER X
-    "Y"  # 89   0x59 -> LATIN CAPITAL LETTER Y
-    "Z"  # 90   0x5A -> LATIN CAPITAL LETTER Z
-    "["  # 91   0x5B -> LEFT SQUARE BRACKET
-    "¥"  # 92   0x5C -> YEN
-    "]"  # 93   0x5D -> RIGHT SQUARE BRACKET
-    "^"  # 94   0x5E -> CIRCUMFLEX ACCENT
-    "_"  # 95   0x5F -> LOW LINE
-    "`"  # 96   0x60 -> GRAVE ACCENT
-    "a"  # 97   0x61 -> LATIN SMALL LETTER A
-    "b"  # 98   0x62 -> LATIN SMALL LETTER B
-    "c"  # 99   0x63 -> LATIN SMALL LETTER C
-    "d"  # 100  0x64 -> LATIN SMALL LETTER D
-    "e"  # 101  0x65 -> LATIN SMALL LETTER E
-    "f"  # 102  0x66 -> LATIN SMALL LETTER F
-    "g"  # 103  0x67 -> LATIN SMALL LETTER G
-    "h"  # 104  0x68 -> LATIN SMALL LETTER H
-    "i"  # 105  0x69 -> LATIN SMALL LETTER I
-    "j"  # 106  0x6A -> LATIN SMALL LETTER J
-    "k"  # 107  0x6B -> LATIN SMALL LETTER K
-    "l"  # 108  0x6C -> LATIN SMALL LETTER L
-    "m"  # 109  0x6D -> LATIN SMALL LETTER M
-    "n"  # 110  0x6E -> LATIN SMALL LETTER N
-    "o"  # 111  0x6F -> LATIN SMALL LETTER O
-    "p"  # 112  0x70 -> LATIN SMALL LETTER P
-    "q"  # 113  0x71 -> LATIN SMALL LETTER Q
-    "r"  # 114  0x72 -> LATIN SMALL LETTER R
-    "s"  # 115  0x73 -> LATIN SMALL LETTER S
-    "t"  # 116  0x74 -> LATIN SMALL LETTER T
-    "u"  # 117  0x75 -> LATIN SMALL LETTER U
-    "v"  # 118  0x76 -> LATIN SMALL LETTER V
-    "w"  # 119  0x77 -> LATIN SMALL LETTER W
-    "x"  # 120  0x78 -> LATIN SMALL LETTER X
-    "y"  # 121  0x79 -> LATIN SMALL LETTER Y
-    "z"  # 122  0x7A -> LATIN SMALL LETTER Z
-    "{"  # 123  0x7B -> LEFT CURLY BRACKET
-    "|"  # 124  0x7C -> VERTICAL LINE
-    "}"  # 125  0x7D -> RIGHT CURLY BRACKET
-    "→"  # 126  0x7E -> RIGHTWARDS ARROW
-    "←"  # 127  0x7F ->  
-    "Û"  # 128  0x80 -> 
-    "Ù"  # 129  0x81 -> 
-    "Ú"  # 130  0x82 -> 
-    "Ü"  # 131  0x83 -> 
-    "û"  # 132  0x84 -> 
-    "ù"  # 133  0x85 -> 
-    "ú"  # 134  0x86 -> 
-    "Ô"  # 135  0x87 -> 
-    "Ò"  # 136  0x88 -> 
-    "Ó"  # 137  0x89 -> 
-    "º"  # 138  0x8A -> 
-    "ô"  # 139  0x8B -> 
-    "ò"  # 140  0x8C -> 
-    "ó"  # 141  0x8D -> 
-    "ö"  # 142  0x8E -> 
-    "¿"  # 143  0x8F -> 
-    "Ê"  # 144  0x90 -> 
-    "È"  # 145  0x91 -> 
-    "É"  # 146  0x92 -> 
-    "Ë"  # 147  0x93 -> 
-    "ê"  # 148  0x94 -> 
-    "è"  # 149  0x95 -> 
-    "é"  # 150  0x96 -> 
-    "ë"  # 151  0x97 -> 
-    "Å"  # 152  0x98 -> 
-    "Ä"  # 153  0x99 -> 
-    "å"  # 154  0x9A -> 
-    "â"  # 155  0x9B -> 
-    "à"  # 156  0x9C -> 
-    "á"  # 157  0x9D -> 
-    "ä"  # 158  0x9E -> 
-    "A"  # 159  0x9F -> 
-    "a"  # 160  0xA0 -> 
-    "Î"  # 161  0xA1 -> 
-    "Ì"  # 162  0xA2 -> 
-    "Í"  # 163  0xA3 -> 
-    "Ï"  # 164  0xA4 -> 
-    "¡"  # 165  0xA5 -> 
-    "Ñ"  # 166  0xA6 -> 
-    "ñ"  # 167  0xA7 -> 
-    "N"  # 168  0xA8 ->  #Binary 168 what is that?
-    "g"  # 169  0xA9 ->  #Binary 169 gram underlined?
-    "g"  # 170  0xAA ->  #Binary 170 gram.
-    "v"  # 171  0xAB ->  #Binary 171 no clue.
-    "v"  # 172  0xAC -> 
-    "w"  # 173  0xAD -> 
-    " "  # 174  0xAE ->  #Binary 174 no idea what that is.
-    "Æ"  # 175  0xAF -> 
-    "§"  # 176  0xB0 -> 
-    "±"  # 177  0xB1 -> 
-    "i"  # 178  0xB2 -> 
-    "↑"  # 179  0xB3 -> 
-    "↓"  # 180  0xB4 -> 
-    "↲"  # 181  0xB5 -> 
-    "ƒ"  # 182  0xB6 -> 
-    "£"  # 183  0xB7 -> 
-    " "  # 184  0xB8 -> 
-    "⤈"  # 185  0xB9 -> 
-    "⤉"  # 186  0xBA -> 
-    " "  # 187  0xBB -> 
-    " "  # 188  0xBC -> 
-    "½"  # 189  0xBD -> 
-    "⅓"  # 190  0xBE -> 
-    "¼"  # 191  0xBF -> 
-    " "  # 192  0xC0 -> 
-    " "  # 193  0xC1 -> 
-    " "  # 194  0xC2 -> 
-    " "  # 195  0xC3 -> 
-    " "  # 196  0xC4 -> 
-    " "  # 197  0xC5 -> 
-    " "  # 198  0xC6 -> 
-    " "  # 199  0xC7 -> 
-    " "  # 200  0xC8 -> 
-    " "  # 201  0xC9 -> 
-    " "  # 202  0xCA -> 
-    " "  # 203  0xCB -> 
-    " "  # 204  0xCC -> 
-    " "  # 205  0xCD -> 
-    "Õ"  # 206  0xCE -> 
-    "õ"  # 207  0xCF -> 
-    " "  # 208  0xD0 -> 
-    " "  # 209  0xD1 -> 
-    " "  # 210  0xD2 -> 
-    " "  # 211  0xD3 -> 
-    " "  # 212  0xD4 -> 
-    " "  # 213  0xD5 -> 
-    " "  # 214  0xD6 -> 
-    " "  # 215  0xD7 -> 
-    " "  # 216  0xD8 -> 
-    " "  # 217  0xD9 -> 
-    "\\"  # 218  0xDA -> 
-    "x"  # 219  0xDB -> 
-    " "  # 220  0xDC -> 
-    " "  # 221  0xDD -> 
-    " "  # 222  0xDE -> 
-    " "  # 223  0xDF ->
-)
-
-encoding_table = codecs.charmap_build(decoding_table)
diff --git a/paradox/lib/utils.py b/paradox/lib/utils.py
index 0eb6e1ed..ef11fa30 100644
--- a/paradox/lib/utils.py
+++ b/paradox/lib/utils.py
@@ -6,6 +6,8 @@
 import re
 import threading
 import typing
+from slugify import slugify
+
 from copy import deepcopy
 
 from construct import Container, ListContainer
@@ -84,7 +86,7 @@ def sanitize_key(key):
     if isinstance(key, int):
         return str(key)
     else:
-        return re_sanitize_key.sub("_", key).strip("_")
+        return re_sanitize_key.sub("_", slugify(key, lowercase=False)).strip("_")
 
 
 def construct_free(container: Container):
diff --git a/requirements.txt b/requirements.txt
index e15d01fc..24a7dd0c 100644
--- a/requirements.txt
+++ b/requirements.txt
@@ -4,6 +4,7 @@
 require-python-3
 construct~=2.9.43
 argparse>=1.4.0
+python-slugify>=4.0.1
 #
 # Optional
 #
diff --git a/setup.py b/setup.py
index af1ae73c..c3df111f 100644
--- a/setup.py
+++ b/setup.py
@@ -23,7 +23,7 @@
     url="https://github.com/ParadoxAlarmInterface/pai",
     download_url=f"https://github.com/ParadoxAlarmInterface/pai/archive/{VERSION}.tar.gz",
     packages=find_packages(exclude=["tests", "tests.*", "config.*", "docs.*"]),
-    install_requires=["construct~=2.9.43", "argparse>=1.4.0"],
+    install_requires=["construct~=2.9.43", "argparse>=1.4.0", "python-slugify>=4.0.1"],
     python_requires=">=3.6",
     setup_requires=["wheel"] + pytest_runner,
     tests_require=[


Test patch:
diff --git a/tests/encodings/charmap_generator.py b/tests/encodings/charmap_generator.py
new file mode 100644
index 00000000..f8414489
--- /dev/null
+++ b/tests/encodings/charmap_generator.py
@@ -0,0 +1,221 @@
+# Generator for Paradox Encodings
+
+# ENGLISH
+
+# map 0 to \x00
+original_ansi = [(0, 0),]
+
+# map 1-32 to space
+original_ansi[1:32] = [
+    (x, 32) for x in range(1,33)
+]
+
+original_ansi[33:127] = [
+    (x, x) for x in range(33,128)
+]
+
+# from 128 to 223, there is a mix and match
+paradox_extra_conversions = {
+128:-37,
+129:-39,
+130:-38,
+131:-36,
+132:-5,
+133:-7,
+134:-6,
+135:-44,
+136:-46,
+137:-45,
+138:-80,
+139:-12,
+140:-14,
+141:-13,
+142:-10,
+143:-65,
+144:-54,
+145:-56,
+146:-55,
+147:-53,
+148:-22,
+149:-24,
+150:-23,
+151:-21,
+152:-59,
+153:-60,
+154:-27,
+155:-30,
+156:-32,
+157:-31,
+158:-28,
+159:-86,
+160:-86,
+161:-18,
+162:-20,
+163:-19,
+164:-17,
+165:-95,
+166:-47,
+167:-15,
+168:-47,
+169:32,
+170:32,
+171:32,
+172:32,
+173:32,
+174:32,
+175:-58,
+176:-89,
+177:-79,
+178:32,
+179:32,
+180:32,
+181:32,
+182:-125,
+183:-93,
+184:32,
+185:32,
+186:32,
+187:32,
+188:-74,
+189:-67,
+190:32,
+191:-68,
+192:-8,
+193:32,
+194:-48,
+195:-33,
+196:-25,
+197:-82,
+198:32,
+199:32,
+200:-75,
+201:-8,
+202:-1,
+203:-61,
+204:-94,
+205:-29,
+206:-43,
+207:-11,
+208:-73,
+209:-88,
+210:-80,
+211:32,
+212:-76,
+213:126,
+214:-9,
+215:-85,
+216:-69,
+217:32,
+218:92,
+219:-41,
+220:-82,
+221:-87,
+222:32,
+223:32
+}
+
+# map to the 0-255 domain the signed ints
+paradox_extra_conversions = [(x, y+256*(0 if y>=0 else 1)) for (x,y) in paradox_extra_conversions.items()]
+
+# convert to space from 224 onwards
+original_ansi[224:255] = [
+    (x, 32) for x in range(224,256)
+]
+
+paradox = {}
+paradox['en'] = original_ansi + paradox_extra_conversions
+paradox['en'].sort(key=lambda x: x[0])
+
+
+
+
+# format: paradox code, unicode hex, char, windows-125* code
+
+# HUNGARIAN (windows-1250 based)
+# extends the original English with a few modifications
+
+paradox['hu'] = paradox['en'].copy()
+paradox['hu'][1] = (1, 0x00c1) # Á    193
+paradox['hu'][2] = (2, 0x0170) # Ű    219
+paradox['hu'][3] = (3, 0x0150) # Ő    213
+paradox['hu'][4] = (4, 0x0151) # ő    245
+#                ?  0x00fc  # ü    252
+#                ?  0x0171  # ű    251
+#                ?  0x00cd  # Í    205
+#                ?  0x00d6  # Ö    214
+
+
+# ESTONIAN (windows-1250 based)
+# extends the original English with a few modifications
+
+paradox['ee'] = paradox['en'].copy()
+paradox['ee'][1] = (1, 0x00fc) # ü    252
+
+# GERMAN (windows-1250 based)
+# extends the original English with a few modifications
+
+paradox['de'] = paradox['en'].copy()
+paradox['de'][1] = (1, 0x00fc) # ü    252
+
+# POLISH (windows-1250 based)
+# extends the original English with a few modifications
+
+paradox['pl'] = paradox['en'].copy()
+#                ?  0x017b  # Ż    175
+paradox['pl'][1] = (1, 0x017c) # ż    191
+#                ?  0x0106  # Ć    198
+paradox['pl'][2] = (2, 0x0107) # ć    230
+#                ?  0x0104  # Ą    165
+paradox['pl'][3] = (3, 0x0105) # ą    185
+#                ?  0x0118  # Ę    202
+paradox['pl'][4] = (4, 0x0119) # ę    234
+#                ?  0x0179  # Ź    143 
+paradox['pl'][5] = (5, 0x017a) # ź    159
+#                ?, 0x0141  # Ł    163
+paradox['pl'][6] = (6, 0x0142) # ł    179
+#                ?, 0x015a  # Ś    140
+paradox['pl'][7] = (7, 0x015b) # ś    156
+
+# PORTUGUESE (windows-1252 based)
+# extends the original English with a few modifications
+
+paradox['pt'] = paradox['en'].copy()
+paradox['pt'][1] = (1, 0x00e3) # ã    227
+
+# ROMANIAN (windows-1250 based)
+# extends the original English with a few modifications
+
+paradox['ro'] = paradox['en'].copy()
+paradox['ro'][1] = (1, 0x0103) # ă    227
+paradox['ro'][2] = (2, 0x0219) # ș    186 (ş, but in Romanian ș is used)
+paradox['ro'][3] = (3, 0x021b) # ț    254 (ş, but in Romanian ț is used)
+
+# TURKISH (windows-1254 based)
+# extends the original English with a few modifications
+
+paradox['tr'] = paradox['en'].copy()
+paradox['tr'][1] = (1, 0x00fc) # ü    252
+paradox['tr'][2] = (2, 0x0131) # ı    253
+
+non_printable = [0, 127, 182]
+needs_escape = [34, 92, 218] # " and \ (appearing twice)
+
+
+def output(name, charmap):
+    f = open("../paradox/lib/encodings/charmaps/" + name + ".py", "w", encoding="utf-8")
+    print("# paradox encoding paradox-" + name, file=f)
+    print("charmap = (", file=f)
+    for (x, y) in charmap:
+        if x in non_printable:
+            char = "\\x" + "{:02x}".format(y)
+        elif x in needs_escape:
+            char = "\\" + chr(y)
+        else:
+            char = chr(y)
+        print('"' + char + '" # ' + str(x) + " " + "{:#06x}".format(y), file=f)
+    print(")", file=f)
+    f.close()
+
+
+for e in paradox:
+    output(e, paradox[e])
diff --git a/tests/hardware/spectra_magellan/test_label_loading.py b/tests/hardware/spectra_magellan/test_label_loading.py
index ebc85ea3..2b0bd129 100644
--- a/tests/hardware/spectra_magellan/test_label_loading.py
+++ b/tests/hardware/spectra_magellan/test_label_loading.py
@@ -70,7 +70,7 @@ async def test_label_loading(mocker):
             "site": [],
             "siren": [],
         },
-        LABEL_ENCODING="latin2",
+        LABEL_ENCODING="paradox-hu",
     )
 
     core = mocker.MagicMock()
@@ -82,5 +82,5 @@ async def test_label_loading(mocker):
 
     zone_labels = labels["zone"]
     assert 4 == len(zone_labels)
-    assert labels["zone"][1]["key"] == "El_t_r"
+    assert labels["zone"][1]["key"] == "Eloter"
     assert labels["zone"][1]["id"] == 1
diff --git a/tests/lib/test_encodings.py b/tests/lib/test_encodings.py
index ff9aee08..ab0281cd 100644
--- a/tests/lib/test_encodings.py
+++ b/tests/lib/test_encodings.py
@@ -1,6 +1,8 @@
 import pytest
 
-from paradox.lib.encodings import en, register_encodings, ru
+from paradox.lib.encodings import register_encodings, ru
+
+from paradox.lib.encodings.charmaps import en
 
 register_encodings()
 
@@ -14,15 +16,15 @@
     (bytes([151]), "ë"),
     (bytes([153]), "Ä"),
     (bytes([158]), "ä"),
-    (bytes([159]), "A"),
-    (bytes([161]), "Î"),
-    (bytes([162]), "Ì"),
-    (bytes([163]), "Í"),
-    (bytes([164]), "Ï"),
+    (bytes([159]), "ª"),
+    (bytes([161]), "î"),
+    (bytes([162]), "ì"),
+    (bytes([163]), "í"),
+    (bytes([164]), "ï"),
     (bytes([177]), "±"),
     (bytes([183]), "£"),
-    (bytes([185]), "⤈"),
-    (bytes([186]), "⤉"),
+    (bytes([185]), " "),
+    (bytes([186]), " "),
     (bytes([206]), "Õ"),
     (bytes([207]), "õ"),
 ]
@@ -37,26 +39,26 @@ def test_en_encoding(raw, expected):
 
 
 def test_en_encoding_len():
-    assert len(en.decoding_table) == 224
-
+    assert len(en.charmap) == 256
 
-test_data_ru = [
-    (b"B", "B"),
-    (b"0", "0"),
-    (b"z", "z"),
-    (bytes([160]), "Б"),
-    (bytes([199]), "я"),
-    (bytes([230]), "щ"),
-]
+# removed temporarily
+# test_data_ru = [
+#     (b"B", "B"),
+#     (b"0", "0"),
+#     (b"z", "z"),
+#     (bytes([160]), "Б"),
+#     (bytes([199]), "я"),
+#     (bytes([230]), "щ"),
+# ]
 
 
-@pytest.mark.parametrize("raw,expected", test_data_ru)
-def test_ru_encoding(raw, expected):
-    encoding = "paradox-ru"
-    assert len(expected) == 1
+# @pytest.mark.parametrize("raw,expected", test_data_ru)
+# def test_ru_encoding(raw, expected):
+#     encoding = "paradox-ru"
+#     assert len(expected) == 1
 
-    assert raw.decode(encoding) == expected, f"char {ord(raw)} != {expected}"
+#     assert raw.decode(encoding) == expected, f"char {ord(raw)} != {expected}"
 
 
-def test_ru_encoding_len():
-    assert len(ru.decoding_table) == 256
+# def test_ru_encoding_len():
+#     assert len(ru.decoding_table) == 256
diff --git a/tests/lib/test_utils.py b/tests/lib/test_utils.py
index 85afa71f..cc19e7a0 100644
--- a/tests/lib/test_utils.py
+++ b/tests/lib/test_utils.py
@@ -45,7 +45,7 @@ def test_deep_merge_extend_lists():
 
 
 def test_sanitize_key():
-    assert sanitize_key("Előtér") == "Előtér"
+    assert sanitize_key("Előtér") == "Eloter"
 
     assert sanitize_key("Living room") == "Living_room"