1
0
mirror of https://github.com/unrealircd/unrealircd.git synced 2026-07-06 12:33:12 +02:00

- NickChars:

- Got rid of 'latin7', tiny mistake ;)
  - Removed e' accent from German (used in borrow-words only), reported by Dukat.
  - Added 'swiss-german', which is just German without es-zett, reported by Dukat.
  - Added 'turkish', supplied by Ayberk Yancatoral.
This commit is contained in:
Bram Matthys
2005-02-21 16:06:08 +00:00
parent 97d4be791b
commit 8ba098a77a
3 changed files with 57 additions and 29 deletions
+5
View File
@@ -636,3 +636,8 @@
the link will be rejected. Note that this will not prevent you from 3.2.2<->3.2.3/CVS
charsets mistakes, but only with linking CVS/3.2.3+ servers. Suggested by Troco (#0002360)
This might need some additional testing, but initial results are positive :).
- NickChars:
- Got rid of 'latin7', tiny mistake ;)
- Removed e' accent from German (used in borrow-words only), reported by Dukat.
- Added 'swiss-german', which is just German without es-zett, reported by Dukat.
- Added 'turkish', supplied by Ayberk Yancatoral.
+4 -3
View File
@@ -569,14 +569,15 @@ A table of all possible choices:<br>
<tr><td>dutch</td><td>Dutch characters</td><td>iso8859-1 (latin1)</td></tr>
<tr><td>french</td><td>French characters</td><td>iso8859-1 (latin1)</td></tr>
<tr><td>german</td><td>German characters</td><td>iso8859-1 (latin1)</td></tr>
<tr><td>swiss-german</td><td>Swiss-German characters (no es-zett)</td><td>iso8859-1 (latin1)</td></tr>
<tr><td>italian</td><td>Italian characters</td><td>iso8859-1 (latin1)</td></tr>
<tr><td>spanish</td><td>Spanish characters</td><td>iso8859-1 (latin1)</td></tr>
<tr><td>swedish</td><td>Swedish characters</td><td>iso8859-1 (latin1)</td></tr>
<tr><td><b>latin1</b></td><td>dutch, french, german, spanish, italian, swedish</td><td>iso8859-1 (latin1)</td></tr>
<tr><td><b>latin1</b></td><td>dutch, french, german, swiss-german, spanish, italian, swedish</td><td>iso8859-1 (latin1)</td></tr>
<tr><td>hungarian</td><td>Hungarian characters</td><td>iso8859-2 (latin2)</td></tr>
<tr><td><b>latin2</b></td><td>hungarian</td><td>iso8859-2 (latin2)</td></tr>
<tr><td>greek</td><td>Greek characters</td><td>iso8859-7</td></tr>
<tr><td><b>latin7</b></td><td>greek</td><td>iso8859-7</td></tr>
<tr><td>turkish</td><td>Turkish characters</td><td>iso8859-9</td></tr>
<tr><td>chinese-simp</td><td>Simplified Chinese</td><td>Multibyte: GBK/GB2312</td></tr>
<tr><td>chinese-trad</td><td>Tradditional Chinese</td><td>Multibyte: GBK</td></tr>
<tr><td>chinese-ja</td><td>Japanese Hiragana/Pinyin</td><td>Multibyte: GBK</td></tr>
@@ -587,7 +588,7 @@ Please note that some combinations can cause problems.
For example, combining latin* and chinese-* can not be properly handled by
the IRCd and Unreal will print an error.
Mixing of other charsets might cause display problems, so Unreal will print out
a warning if you try to mix latin1/latin2/latin7.<br><br>
a warning if you try to mix latin1/latin2/greek.<br><br>
Example 1, for people of western europe:<br>
<pre>set { allowed-nickchars { latin1; }; };</pre>
+48 -26
View File
@@ -69,10 +69,11 @@ static int langav;
char langsinuse[4096];
/* bitmasks: */
#define LANGAV_ASCII 0x0001 /* 8 bit ascii */
#define LANGAV_LATIN1 0x0002 /* latin1 (western europe) */
#define LANGAV_LATIN2 0x0004 /* latin2 (eastern europe, eg: hungarian) */
#define LANGAV_LATIN7 0x0008 /* latin7 (greek) */
#define LANGAV_ASCII 0x0001 /* 8 bit ascii */
#define LANGAV_LATIN1 0x0002 /* latin1 (western europe) */
#define LANGAV_LATIN2 0x0004 /* latin2 (eastern europe, eg: hungarian) */
#define LANGAV_ISO8859_7 0x0008 /* greek */
#define LANGAV_ISO8859_9 0x0010 /* turkish */
#define LANGAV_GBK 0x1000 /* (Chinese) GBK encoding */
typedef struct _langlist LangList;
@@ -83,25 +84,26 @@ struct _langlist
int setflags;
};
/* MUST be alphabetized */
/* MUST be alphabetized (first column) */
static LangList langlist[] = {
{ "catalan", "cat", LANGAV_ASCII|LANGAV_LATIN1 },
{ "chinese", "chi-s,chi-t,chi-j", LANGAV_GBK },
{ "catalan", "cat", LANGAV_ASCII|LANGAV_LATIN1 },
{ "chinese", "chi-s,chi-t,chi-j", LANGAV_GBK },
{ "chinese-simp", "chi-s", LANGAV_GBK },
{ "chinese-trad", "chi-t", LANGAV_GBK },
{ "chinese-ja", "chi-j", LANGAV_GBK },
{ "dutch", "dut", LANGAV_ASCII|LANGAV_LATIN1 },
{ "french", "fre", LANGAV_ASCII|LANGAV_LATIN1 },
{ "gbk", "chi-s,chi-t,chi-j", LANGAV_GBK },
{ "german", "ger", LANGAV_ASCII|LANGAV_LATIN1 },
{ "greek", "gre", LANGAV_ASCII|LANGAV_LATIN7 },
{ "hungarian", "hun", LANGAV_ASCII|LANGAV_LATIN2 },
{ "italian", "ita", LANGAV_ASCII|LANGAV_LATIN1 },
{ "latin1", "cat,dut,fre,ger,ita,spa,swe", LANGAV_ASCII|LANGAV_LATIN1 },
{ "latin2", "hun", LANGAV_ASCII|LANGAV_LATIN2 },
{ "latin7", "gre", LANGAV_ASCII|LANGAV_LATIN7 },
{ "spanish", "spa", LANGAV_ASCII|LANGAV_LATIN1 },
{ "swedish", "swe", LANGAV_ASCII|LANGAV_LATIN1 },
{ "chinese-ja", "chi-j", LANGAV_GBK },
{ "dutch", "dut", LANGAV_ASCII|LANGAV_LATIN1 },
{ "french", "fre", LANGAV_ASCII|LANGAV_LATIN1 },
{ "gbk", "chi-s,chi-t,chi-j", LANGAV_GBK },
{ "german", "ger", LANGAV_ASCII|LANGAV_LATIN1 },
{ "greek", "gre", LANGAV_ASCII|LANGAV_ISO8859_7 },
{ "hungarian", "hun", LANGAV_ASCII|LANGAV_LATIN2 },
{ "italian", "ita", LANGAV_ASCII|LANGAV_LATIN1 },
{ "latin1", "cat,dut,fre,ger,ita,spa,swe", LANGAV_ASCII|LANGAV_LATIN1 },
{ "latin2", "hun", LANGAV_ASCII|LANGAV_LATIN2 },
{ "spanish", "spa", LANGAV_ASCII|LANGAV_LATIN1 },
{ "swedish", "swe", LANGAV_ASCII|LANGAV_LATIN1 },
{ "swiss-german", "swg", LANGAV_ASCII|LANGAV_LATIN1 },
{ "turkish", "tur", LANGAV_ASCII|LANGAV_ISO8859_9 },
{ NULL, NULL, 0 }
};
@@ -319,12 +321,14 @@ int x=0;
x++;
if (langav & LANGAV_LATIN2)
x++;
if (langav & LANGAV_LATIN7)
x++;
if (langav & LANGAV_ISO8859_7)
x++;
if (langav & LANGAV_ISO8859_9)
x++;
if (x > 1)
{
config_status("WARNING: set::accept-language: "
"Mixing of charsets (eg: latin1+latin2+latin7) can cause display problems");
"Mixing of charsets (eg: latin1+latin2) can cause display problems");
}
return 1;
}
@@ -429,10 +433,16 @@ char latin1=0, latin2=0, chinese=0;
/* INDIVIDUAL CHARSETS */
/* [LATIN1] */
if (latin1 || !strcmp(name, "german"))
{
/* a", A", e', o", O", u", U" and es-zett */
charsys_addallowed("äÄéöÖüÜß");
/* a", A", o", O", u", U" and es-zett */
charsys_addallowed("äÄöÖüÜß");
}
if (latin1 || !strcmp(name, "swiss-german"))
{
/* a", A", o", O", u", U" */
charsys_addallowed("äÄöÖüÜ");
}
if (latin1 || !strcmp(name, "dutch"))
{
@@ -476,18 +486,30 @@ char latin1=0, latin2=0, chinese=0;
/* ao, Ao, a", A", o", O" */
charsys_addallowed("楊握寢");
}
/* [LATIN2] */
if (latin2 || !strcmp(name, "hungarian"))
{
/* supplied by AngryWolf */
/* a', e', i', o', o", o~, u', u", u~, A', E', I', O', O", O~, U', U", U~ */
charsys_addallowed("誦腸托兄弧棠樑蔔");
}
if (!strcmp(name, "latin7") || !strcmp(name, "greek"))
/* [GREEK] */
if (!strcmp(name, "greek"))
{
/* supplied by GSF */
/* ranges from rfc1947 / iso 8859-7 */
charsys_addallowed("떳뭔센오좌쳐탬픽盖誥國儺桐虜妹膊覆泗褻栒鴨鉛僥幽日全猝膣");
}
if (!strcmp(name, "turkish"))
{
/* Supplied by Ayberk Yancatoral */
charsys_addallowed("öÖçÇþÞüÜðÐý");
}
/* [CHINESE] */
if (chinese || !strcmp(name, "chinese-ja"))
{
charsys_addmultibyterange(0xa4, 0xa4, 0xa1, 0xf3); /* JIS_PIN */