summaryrefslogtreecommitdiffstats
path: root/tools/encoding
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2023-02-21 23:16:14 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2023-02-21 23:16:14 (GMT)
commitf95599f4d4b6e502a92971909286a8ec6533c8c2 (patch)
treecbfb97b3111a3003be51910b39a326175ce0c02f /tools/encoding
parent42956f6f09023c19e2c057150f6584f0f1f40b4c (diff)
downloadtcl-f95599f4d4b6e502a92971909286a8ec6533c8c2.zip
tcl-f95599f4d4b6e502a92971909286a8ec6533c8c2.tar.gz
tcl-f95599f4d4b6e502a92971909286a8ec6533c8c2.tar.bz2
More encoding fixes, e.g. range 0x80-0x9F for dingbats and symbol. Remove "-m" option from txt2enc.c tool, since the same is already handled in the table encoding code in Tcl itself. This was wat prevent Tcl to handle throwing exceptions correctly
Diffstat (limited to 'tools/encoding')
-rw-r--r--tools/encoding/Makefile2
-rw-r--r--tools/encoding/dingbats.txt1
-rw-r--r--tools/encoding/gb1988.txt1
-rw-r--r--tools/encoding/macTurkish.txt1
-rw-r--r--tools/encoding/macUkraine.txt1
-rw-r--r--tools/encoding/symbol.txt1
-rw-r--r--tools/encoding/txt2enc.c14
7 files changed, 7 insertions, 14 deletions
diff --git a/tools/encoding/Makefile b/tools/encoding/Makefile
index 7235b47..a2122d5 100644
--- a/tools/encoding/Makefile
+++ b/tools/encoding/Makefile
@@ -67,7 +67,7 @@ encodings: clean txt2enc $(EUC_ENCODINGS)
@for p in *.txt; do \
enc=`echo $$p | sed 's/\..*$$/\.enc/'`; \
echo $$enc; \
- ./txt2enc -m $$p > $$enc; \
+ ./txt2enc $$p > $$enc; \
done
@echo
@echo Compiling special versions of encoding files.
diff --git a/tools/encoding/dingbats.txt b/tools/encoding/dingbats.txt
index 334f8d6..93a6081 100644
--- a/tools/encoding/dingbats.txt
+++ b/tools/encoding/dingbats.txt
@@ -155,6 +155,7 @@
0x7C 0x275C # HEAVY SINGLE COMMA QUOTATION MARK ORNAMENT
0x7D 0x275D # HEAVY DOUBLE TURNED COMMA QUOTATION MARK ORNAMENT
0x7E 0x275E # HEAVY DOUBLE COMMA QUOTATION MARK ORNAMENT
+0x7F 0x275E # DELETE
0xA1 0x2761 # CURVED STEM PARAGRAPH SIGN ORNAMENT
0xA2 0x2762 # HEAVY EXCLAMATION MARK ORNAMENT
0xA3 0x2763 # HEAVY HEART EXCLAMATION MARK ORNAMENT
diff --git a/tools/encoding/gb1988.txt b/tools/encoding/gb1988.txt
index 800cd68..b9197e5 100644
--- a/tools/encoding/gb1988.txt
+++ b/tools/encoding/gb1988.txt
@@ -93,6 +93,7 @@
0x7C 0x007C # VERTICAL LINE
0x7D 0x007D # RIGHT CURLY BRACKET
0x7E 0x203E # OVERLINE
+0x7F 0x007F # DELETE
0xA1 0xFF61 # HALFWIDTH IDEOGRAPHIC FULL STOP
0xA2 0xFF62 # HALFWIDTH LEFT CORNER BRACKET
0xA3 0xFF63 # HALFWIDTH RIGHT CORNER BRACKET
diff --git a/tools/encoding/macTurkish.txt b/tools/encoding/macTurkish.txt
index 4a1ddab..ca3cda3 100644
--- a/tools/encoding/macTurkish.txt
+++ b/tools/encoding/macTurkish.txt
@@ -203,6 +203,7 @@
0x7C 0x007C # VERTICAL LINE
0x7D 0x007D # RIGHT CURLY BRACKET
0x7E 0x007E # TILDE
+0x7F 0x007F # DELETE
#
0x80 0x00C4 # LATIN CAPITAL LETTER A WITH DIAERESIS
0x81 0x00C5 # LATIN CAPITAL LETTER A WITH RING ABOVE
diff --git a/tools/encoding/macUkraine.txt b/tools/encoding/macUkraine.txt
index dba4e10..dc07cdc 100644
--- a/tools/encoding/macUkraine.txt
+++ b/tools/encoding/macUkraine.txt
@@ -148,6 +148,7 @@
0x7C 0x007C # VERTICAL LINE
0x7D 0x007D # RIGHT CURLY BRACKET
0x7E 0x007E # TILDE
+0x7F 0x007F # DELETE
#
0x80 0x0410 # CYRILLIC CAPITAL LETTER A
0x81 0x0411 # CYRILLIC CAPITAL LETTER BE
diff --git a/tools/encoding/symbol.txt b/tools/encoding/symbol.txt
index 12dcae6..13a3ed8 100644
--- a/tools/encoding/symbol.txt
+++ b/tools/encoding/symbol.txt
@@ -169,6 +169,7 @@
0x7C 0x007C # VERTICAL LINE
0x7D 0x007D # RIGHT CURLY BRACKET
0x7E 0x223C # TILDE OPERATOR
+0x7F 0x007F # DELETE
0xA1 0x03D2 # GREEK UPSILON WITH HOOK SYMBOL
0xA2 0x2032 # PRIME
0xA3 0x2264 # LESS-THAN OR EQUAL TO
diff --git a/tools/encoding/txt2enc.c b/tools/encoding/txt2enc.c
index 7ee797b..80b44b9 100644
--- a/tools/encoding/txt2enc.c
+++ b/tools/encoding/txt2enc.c
@@ -26,7 +26,7 @@ main(int argc, char **argv)
{
FILE *fp;
Rune *toUnicode[256];
- int i, multiByte, enc, uni, hi, lo, fixmissing, used, maxEnc;
+ int i, multiByte, enc, uni, hi, lo, used, maxEnc;
int ch, encColumn, uniColumn, fallbackKnown, width;
char *fallbackString, *str, *rest, *dot;
unsigned int magic, type, symbol, fallbackChar;
@@ -43,7 +43,6 @@ main(int argc, char **argv)
fallbackKnown = 0;
type = -1;
symbol = 0;
- fixmissing = 1;
opterr = 0;
while (1) {
@@ -89,10 +88,6 @@ main(int argc, char **argv)
symbol = 1;
break;
- case 'm':
- fixmissing = 0;
- break;
-
default:
goto usage;
}
@@ -207,13 +202,6 @@ main(int argc, char **argv)
for (i = 0; i < 0x20; i++) {
toUnicode[0][i] = i;
}
- if (fixmissing) {
- for (i = 0x7F; i < 0xA0; i++) {
- if (toUnicode[i] == NULL && toUnicode[0][i] == 0) {
- toUnicode[0][i] = i;
- }
- }
- }
}
printf("# Encoding file: %s, %s-byte\n", argv[argc - 1], typeString[type]);