diff --git a/Versions/build.txt b/Versions/build.txt
index db88a8627..7f8dea745 100644
--- a/Versions/build.txt
+++ b/Versions/build.txt
@@ -1 +1 @@
-2250
+2252
diff --git a/language/common_res.h b/language/common_res.h
index e747f152d..44f20c82b 100644
--- a/language/common_res.h
+++ b/language/common_res.h
@@ -1031,6 +1031,7 @@
#define IDS_LEX_STR_63353 63353
#define IDS_LEX_STR_63354 63354
#define IDS_LEX_STR_63355 63355
+#define IDS_LEX_STR_63356 63356
#define RICHEDIT_CONTROL_VER "RichEdit50W" // RICHEDIT_CONTROL_VER
diff --git a/language/np3_af_za/lexer_af_za.rc b/language/np3_af_za/lexer_af_za.rc
index 98e71d8cb..187bafc80 100644
--- a/language/np3_af_za/lexer_af_za.rc
+++ b/language/np3_af_za/lexer_af_za.rc
@@ -446,6 +446,7 @@ BEGIN
IDS_LEX_STR_63353 "2de In lyn-IME Kleur"
IDS_LEX_STR_63354 "Multi Edit Indicator"
IDS_LEX_STR_63355 "2nd Multi Edit Indicator"
+ IDS_LEX_STR_63356 "Date-Time"
END
#endif // Afrikaans (South Africa) resources
diff --git a/language/np3_be_by/lexer_be_by.rc b/language/np3_be_by/lexer_be_by.rc
index 5e404ea2e..a37b026e3 100644
--- a/language/np3_be_by/lexer_be_by.rc
+++ b/language/np3_be_by/lexer_be_by.rc
@@ -446,6 +446,7 @@ BEGIN
IDS_LEX_STR_63353 "2nd Inline-IME Color"
IDS_LEX_STR_63354 "Multi Edit Indicator"
IDS_LEX_STR_63355 "2nd Multi Edit Indicator"
+ IDS_LEX_STR_63356 "Date-Time"
END
#endif // Belarusian (Belarus) resources
diff --git a/language/np3_de_de/lexer_de_de.rc b/language/np3_de_de/lexer_de_de.rc
index 98759079c..2a0844aa3 100644
--- a/language/np3_de_de/lexer_de_de.rc
+++ b/language/np3_de_de/lexer_de_de.rc
@@ -446,6 +446,7 @@ BEGIN
IDS_LEX_STR_63353 "2te Inline-IME Farbe"
IDS_LEX_STR_63354 "Multi Edit Indicator"
IDS_LEX_STR_63355 "2nd Multi Edit Indicator"
+ IDS_LEX_STR_63356 "Date-Time"
END
#endif // German (Germany) resources
diff --git a/language/np3_en_gb/lexer_en_gb.rc b/language/np3_en_gb/lexer_en_gb.rc
index 0bee37937..20fb8fc9e 100644
--- a/language/np3_en_gb/lexer_en_gb.rc
+++ b/language/np3_en_gb/lexer_en_gb.rc
@@ -446,6 +446,7 @@ BEGIN
IDS_LEX_STR_63353 "2nd Inline-IME Color"
IDS_LEX_STR_63354 "Multi Edit Indicator"
IDS_LEX_STR_63355 "2nd Multi Edit Indicator"
+ IDS_LEX_STR_63356 "Date-Time"
END
#endif // English (United Kingdom) resources
diff --git a/language/np3_en_us/lexer_en_us.rc b/language/np3_en_us/lexer_en_us.rc
index 803df5bed..eb091720a 100644
--- a/language/np3_en_us/lexer_en_us.rc
+++ b/language/np3_en_us/lexer_en_us.rc
@@ -446,6 +446,7 @@ BEGIN
IDS_LEX_STR_63353 "2nd Inline-IME Color"
IDS_LEX_STR_63354 "Multi Edit Indicator"
IDS_LEX_STR_63355 "2nd Multi Edit Indicator"
+ IDS_LEX_STR_63356 "Date-Time"
END
#endif // English (United States) resources
diff --git a/language/np3_es_es/lexer_es_es.rc b/language/np3_es_es/lexer_es_es.rc
index 66884aed6..7ce7429e3 100644
--- a/language/np3_es_es/lexer_es_es.rc
+++ b/language/np3_es_es/lexer_es_es.rc
@@ -446,6 +446,7 @@ BEGIN
IDS_LEX_STR_63353 "2nd Inline-IME Color"
IDS_LEX_STR_63354 "Multi Edit Indicator"
IDS_LEX_STR_63355 "2nd Multi Edit Indicator"
+ IDS_LEX_STR_63356 "Date-Time"
END
#endif // Spanish (Spain, International Sort) resources
diff --git a/language/np3_fr_fr/lexer_fr_fr.rc b/language/np3_fr_fr/lexer_fr_fr.rc
index d6187e6d5..c4cce1d44 100644
--- a/language/np3_fr_fr/lexer_fr_fr.rc
+++ b/language/np3_fr_fr/lexer_fr_fr.rc
@@ -446,6 +446,7 @@ BEGIN
IDS_LEX_STR_63353 "2nd Inline-IME Color"
IDS_LEX_STR_63354 "Multi Edit Indicator"
IDS_LEX_STR_63355 "2nd Multi Edit Indicator"
+ IDS_LEX_STR_63356 "Date-Time"
END
#endif // French (France) resources
diff --git a/language/np3_hu_hu/dialogs_hu_hu.rc b/language/np3_hu_hu/dialogs_hu_hu.rc
index d4a33a66b..bff9c58db 100644
--- a/language/np3_hu_hu/dialogs_hu_hu.rc
+++ b/language/np3_hu_hu/dialogs_hu_hu.rc
@@ -86,17 +86,17 @@ FONT 8, "MS Shell Dlg", 0, 0, 0x0
BEGIN
LTEXT "Szve&g keresse:",IDC_STATIC,7,7,66,8
COMBOBOX IDC_FINDTEXT,7,17,192,116,CBS_DROPDOWN | CBS_AUTOHSCROLL | WS_VSCROLL | WS_TABSTOP
- CONTROL "&Kisbet/nagybet szmt",IDC_FINDCASE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,7,37,89,10
+ CONTROL "&Kis-/nagybet szmt",IDC_FINDCASE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,7,37,53,10
CONTROL "E&gsz szavakra egyezs",IDC_FINDWORD,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,7,49,89,10
- CONTROL "Szkez&detre egyezs",IDC_FINDSTART,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,7,61,110,10
- CONTROL "&Visszaperjel talaktsa",IDC_FINDTRANSFORMBS,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,7,73,89,10
- CONTROL "R&egulris kifejezs keresse",IDC_FINDREGEXP,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,7,85,97,10
- CONTROL "Pont &mindenre egyezik",IDC_DOT_MATCH_ALL,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,18,96,85,10
+ CONTROL "Sz ele&jre egyezs",IDC_FINDSTART,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,7,61,110,10
+ CONTROL "&Backslash talaktsok",IDC_FINDTRANSFORMBS,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,7,73,85,10
+ CONTROL "R&egulris kifejezssel",IDC_FINDREGEXP,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,7,85,96,10
+ CONTROL "Pont &mindenre egyezik",IDC_DOT_MATCH_ALL,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,18,96,65,10
CONTROL "&Ne menjen krbe",IDC_NOWRAP,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,125,37,75,10
- CONTROL "Cser&ls utn bezr",IDC_FINDCLOSE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,125,49,80,10
- CONTROL "El&fordulsok jellse",IDC_ALL_OCCURRENCES,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,125,61,75,10
- CONTROL "&Joker kar. keress",IDC_WILDCARDSEARCH,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,125,85,63,10
- CONTROL "tltsz md, ha nincs fkuszban",IDC_TRANSPARENT,
+ CONTROL "Ta&llat utn bezrs",IDC_FINDCLOSE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,125,49,65,10
+ CONTROL "Tallat&ok jellse",IDC_ALL_OCCURRENCES,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,125,61,73,10
+ CONTROL "&Joker keress",IDC_WILDCARDSEARCH,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,125,85,63,10
+ CONTROL "tltsz md, ha nincs fkuszban ",IDC_TRANSPARENT,
"Button",BS_AUTOCHECKBOX | WS_TABSTOP,7,118,124,10
DEFPUSHBUTTON "&Kv. keresse",IDOK,211,7,55,14
PUSHBUTTON "&Elz keresse",IDC_FINDPREV,211,24,55,14
@@ -120,16 +120,16 @@ BEGIN
COMBOBOX IDC_FINDTEXT,7,17,192,116,CBS_DROPDOWN | CBS_AUTOHSCROLL | WS_VSCROLL | WS_TABSTOP
LTEXT "Cserls &erre:",IDC_STATIC,7,36,44,8
COMBOBOX IDC_REPLACETEXT,7,47,192,116,CBS_DROPDOWN | CBS_AUTOHSCROLL | WS_VSCROLL | WS_TABSTOP
- CONTROL "Kisbet/nagybet szmt",IDC_FINDCASE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,7,66,89,10
+ CONTROL "Kis-/nag&ybet szmt",IDC_FINDCASE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,7,66,89,10
CONTROL "Egs&z szavakra egyezs",IDC_FINDWORD,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,7,78,89,10
CONTROL "Szkez&detre egyezs",IDC_FINDSTART,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,7,90,110,10
- CONTROL "&Visszaperjel talaktsa",IDC_FINDTRANSFORMBS,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,7,102,89,10
+ CONTROL "Back&slash talakts",IDC_FINDTRANSFORMBS,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,7,102,89,10
CONTROL "R&egulris kifejezs keresse",IDC_FINDREGEXP,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,7,114,97,10
CONTROL "Pont &mindenre egyezik",IDC_DOT_MATCH_ALL,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,18,125,85,10
CONTROL "&Ne menjen krbe",IDC_NOWRAP,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,125,66,75,10
- CONTROL "Cser&ls utn bezr",IDC_FINDCLOSE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,125,78,80,10
+ CONTROL "Csere utn bezr",IDC_FINDCLOSE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,125,78,80,10
CONTROL "El&fordulsok jellse",IDC_ALL_OCCURRENCES,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,125,90,75,10
- CONTROL "&Joker kar. keress",IDC_WILDCARDSEARCH,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,125,114,63,10
+ CONTROL "&Joker keress",IDC_WILDCARDSEARCH,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,125,114,63,10
CONTROL "tltsz md, ha nincs fkuszban",IDC_TRANSPARENT,
"Button",BS_AUTOCHECKBOX | WS_TABSTOP,7,144,124,10
DEFPUSHBUTTON "K&v. keresse",IDOK,211,7,55,14
@@ -256,8 +256,8 @@ CAPTION "F
FONT 8, "MS Shell Dlg", 400, 0, 0x1
BEGIN
CONTROL "",IDC_FILEMRU,"SysListView32",LVS_REPORT | LVS_SINGLESEL | LVS_SHOWSELALWAYS | LVS_SHAREIMAGELISTS | LVS_AUTOARRANGE | LVS_NOCOLUMNHEADER | WS_BORDER | WS_TABSTOP,7,7,255,97
- CONTROL "K&urzor helye megmarad.",IDC_PRESERVECARET,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,7,119,96,10
- CONTROL "&Fjl elzmnylista mentse kilpskor.",IDC_SAVEMRU,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,7,107,125,10
+ CONTROL "K&urzor helyt megjegyzi",IDC_PRESERVECARET,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,7,119,96,10
+ CONTROL "&Fjl elzmnyek mentse kilpskor.",IDC_SAVEMRU,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,7,107,96,10
CONTROL "&Keressi minta megjegyzse.",IDC_REMEMBERSEARCHPATTERN,
"Button",BS_AUTOCHECKBOX | WS_TABSTOP,7,130,96,10
PUSHBUTTON "Kihagys",IDC_REMOVE,212,107,50,14,WS_DISABLED
@@ -471,14 +471,14 @@ FONT 8, "MS Shell Dlg", 0, 0, 0x0
BEGIN
DEFPUSHBUTTON "OK",IDOK,245,98,50,14
PUSHBUTTON "Mgsem",IDCANCEL,184,98,50,14
- CONTROL "j mester kulcs megadsa",IDC_PWD_CHECK1,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,107,60,95,10
+ CONTROL "j mesterkulcs megadsa",IDC_PWD_CHECK1,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,107,60,84,10
EDITTEXT IDC_PWD_EDIT1,17,35,276,12,ES_PASSWORD | ES_AUTOHSCROLL | WS_GROUP
EDITTEXT IDC_PWD_EDIT2,17,74,277,12,ES_PASSWORD | ES_AUTOHSCROLL
- LTEXT "Nem ktelez mester kulcs:",IDC_STATIC,17,61,88,10,NOT WS_GROUP
- CONTROL "Kdols jelmondat segtsgvel",IDC_PWD_CHECK2,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,17,21,128,10
- CONTROL "Mester kulcs jrafelhasznlsa",IDC_PWD_CHECK3,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,218,60,76,10
+ LTEXT "Nem ktelez mesterkulcs:",IDC_STATIC,17,61,72,10,NOT WS_GROUP
+ CONTROL "Kdols jelmondat segtsgvel",IDC_PWD_CHECK2,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,17,21,98,10
+ CONTROL "Mesterkulcs jrafelhasznlsa",IDC_PWD_CHECK3,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,218,60,76,10
GROUPBOX "Jelmondat",IDC_STATIC,7,7,297,108
- CONTROL "Jelmondatok megjelentse",IDC_PWD_CHECK4,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,18,97,98,10
+ CONTROL "Jelmondat megjelentse",IDC_PWD_CHECK4,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,18,97,75,10
END
IDD_MUI_READPW DIALOGEX 0, 0, 299, 81
@@ -511,9 +511,9 @@ STYLE DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | WS_POPUP | WS_CAPTION | WS_SYSM
CAPTION "Sorok mdostsa"
FONT 8, "MS Shell Dlg", 0, 0, 0x0
BEGIN
- LTEXT "Szveg a sor &elejre:",IDC_STATIC,7,7,62,8
+ LTEXT "Sor &elejre:",IDC_STATIC,7,7,62,8
EDITTEXT 100,7,18,98,14,ES_AUTOHSCROLL
- LTEXT "Szveg a sor &vgre:",IDC_STATIC,7,37,68,8
+ LTEXT "Sor &vgre:",IDC_STATIC,7,37,68,8
EDITTEXT 101,7,48,98,14,ES_AUTOHSCROLL
DEFPUSHBUTTON "OK",IDOK,125,7,50,14
PUSHBUTTON "Mgsem",IDCANCEL,125,24,50,14
diff --git a/language/np3_hu_hu/lexer_hu_hu.rc b/language/np3_hu_hu/lexer_hu_hu.rc
index bb7976e4e..0e15c8f67 100644
--- a/language/np3_hu_hu/lexer_hu_hu.rc
+++ b/language/np3_hu_hu/lexer_hu_hu.rc
@@ -446,6 +446,7 @@ BEGIN
IDS_LEX_STR_63353 "2nd Inline-IME Color"
IDS_LEX_STR_63354 "Multi Edit Indicator"
IDS_LEX_STR_63355 "2nd Multi Edit Indicator"
+ IDS_LEX_STR_63356 "Date-Time"
END
#endif // Hungarian (Hungary) resources
diff --git a/language/np3_hu_hu/menu_hu_hu.rc b/language/np3_hu_hu/menu_hu_hu.rc
index c1f2893dd..ee8e00786 100644
--- a/language/np3_hu_hu/menu_hu_hu.rc
+++ b/language/np3_hu_hu/menu_hu_hu.rc
@@ -196,7 +196,7 @@ BEGIN
MENUITEM SEPARATOR
MENUITEM "&Backtick\tCtrl+6", CMD_EMBRACE4
MENUITEM SEPARATOR
- MENUITEM "&Ezzel...\tAlt+Q", IDM_EDIT_ENCLOSESELECTION
+ MENUITEM "&Egyni...\tAlt+Q", IDM_EDIT_ENCLOSESELECTION
END
MENUITEM "Sor/Kijells &dupliklsa\tCtrl+D", IDM_EDIT_DUPLINEORSELECTION
MENUITEM SEPARATOR
@@ -310,7 +310,7 @@ BEGIN
MENUITEM "Httrs&zn", IDM_VIEW_HILITCURLN_BACK
MENUITEM "K&eret", IDM_VIEW_HILITCURLN_FRAME
END
- POPUP "El&fordulsok jellse"
+ POPUP "El&fordulsok kiemelse"
BEGIN
MENUITEM "&Aktv\tAlt+A", IDM_VIEW_MARKOCCUR_ONOFF
MENUITEM SEPARATOR
diff --git a/language/np3_hu_hu/strings_hu_hu.rc b/language/np3_hu_hu/strings_hu_hu.rc
index ef1d0d74b..60806d02c 100644
--- a/language/np3_hu_hu/strings_hu_hu.rc
+++ b/language/np3_hu_hu/strings_hu_hu.rc
@@ -117,7 +117,7 @@ BEGIN
IDS_MUI_OPENWITH "Vlassza ki a mappt, ahol a kedvenc alkamazsaira mutat parancsikonok vannak."
IDS_MUI_FAVORITES "Vlassza ki a mappt, ahol a kedvenc fjljaira mutat parancsikonok vannak."
IDS_MUI_BACKSLASHHELP "Backslash talaktsok\n\n\\a\tFigyelmeztets (BEL, Ascii 7)\n\\b\tBackspace (BS, Ascii 8)\n\\f\tLapdobs (FF, Ascii 12)\n\\n\tj sor (LF, Ascii 10)\n\\r\tKocsi vissza (CR, Ascii 13)\n\\t\tVzszintes Tab (HT, Ascii 9)\n\\v\tFggleges Tab (VT, Ascii 11)\n\\0oo\tOktlis rtk\n\\u####\tHexadecimlis rtk\n\\xhh\tHexadecimal Value\n\\\\\tBackslash"
- IDS_MUI_REGEXPHELP "RegExp illeszkeds szintaktika (tbbsoros)\n\n.\tBrmilyen karakterre illeszkedik\n^\tres szveg rgtn j sor utn\n$\tres szveg kzvetlenl a sorvge eltt\n\\<\tSz kezdete\n\\>\tSz vge\n\\b\tSz hatra\n[...]\tKarakterek halmaza ([abc]) vagy intervalluma ([a-z])\n[^...]\tKarakterek, amik NINCSENEK a kszletben vagy\n\taz intervallumban\n\\d\t10-es szmrendszeri szm\n\\D\tNem szm kar.\n\\s\tres hely karakterek\n\\S\tNEM res hely karakter\n\\w\t""sz"" karakterek\n\\W\t""nem-sz"" karakter\n\\x\tEscape karakter egybknt specilis jelentssel\n\\xHH\tKarakter HH Hexa kddal\n?\tElzre illeszkedik 0-szor vagy 1-szer\n*\tElzre illeszkedik 0-szor vagy tbbszr\n+\tElzre illeszkedik egyszer vagy tbbszr\n*? or +?\tIsmtlsek illeszkedse lomhn ""?"" and ""+""\n(\tRgi kezdete\n)\tRgi vge\n\\n\tCsernl egy rgira hivatkozik (n = 1-9)\n"
+ IDS_MUI_REGEXPHELP "RegExp illeszkeds szintaktika (tbbsoros)\n\n.\tBrmilyen karakterre illeszkedik\n^\tres szveg rgtn j sor utn\n$\tres szveg kzvetlenl a sorvge eltt\n\\<\tSz kezdete\n\\>\tSz vge\n\\b\tSz hatra\n[...]\tKarakterek halmaza ([abc]) vagy intervalluma ([a-z])\n[^...]\tKarakterek, amik NINCSENEK a kszletben vagy az intervallumban\n\\d\t10-es szmrendszeri szm\n\\D\tNem szm karakter\n\\s\tres hely karakterek\n\\S\tNEM res hely karakter\n\\w\t""sz"" karakterek\n\\W\t""nem-sz"" karakter\n\\x\tEscape karakter egybknt specilis jelentssel\n\\xHH\tKarakter HH Hexa kddal\n?\tElzre illeszkedik 0-szor vagy 1-szer\n*\tElzre illeszkedik 0-szor vagy tbbszr\n+\tElzre illeszkedik egyszer vagy tbbszr\n*? or +?\tIsmtlsek illeszkedse lomhn ""?"" and ""+""\n(\tRgi kezdete\n)\tRgi vge\n\\n\tCsernl egy rgira hivatkozik (n = 1-9)\n"
IDS_MUI_WILDCARDHELP "Joker keress\n\n*\tNulla vagy tbb karakterre illeszkedik.\n?\tPontosan egy karakterre illeszkedik. "
END
@@ -246,7 +246,7 @@ Haszn
Notepad3 \t[/?] [...[kdols]] [...[sorvg md]] [/e] [/g] [/m] [/l]\r\n\
\t[/q] [/s] [/d] [/h] [/x] [/c] [/b] [/n] [/r| [/p] [/t] [/i] [/o]\r\n\
\t[/f] [/u] [/v] [/vd] [/y] [/z] [[meghajt:][tvonal]fjlnv[...]]\r\n\r\n\
-fjl\tAz utols paramter kell legyen, alapbl nincsenekidzjelezett szkzk.\r\n\
+fjl\tAz utols paramter kell legyen, alapbl nincsenek idzjelezett szkzk.\r\n\
+\tTbb fjlt is elfogad (idzjelezett szkzkkel).\r\n\
-\tEgy fjlt fogad el paramterknt (idzjelezett szkzk nlkl).\r\n\r\n\
Opcik:\r\n\
diff --git a/language/np3_it_it/lexer_it_it.rc b/language/np3_it_it/lexer_it_it.rc
index e528ec30f..b3f2cbdd9 100644
--- a/language/np3_it_it/lexer_it_it.rc
+++ b/language/np3_it_it/lexer_it_it.rc
@@ -446,6 +446,7 @@ BEGIN
IDS_LEX_STR_63353 "2nd Inline-IME Color"
IDS_LEX_STR_63354 "Multi Edit Indicator"
IDS_LEX_STR_63355 "2nd Multi Edit Indicator"
+ IDS_LEX_STR_63356 "Date-Time"
END
#endif // Italian (Italy) resources
diff --git a/language/np3_ja_jp/lexer_ja_jp.rc b/language/np3_ja_jp/lexer_ja_jp.rc
index 6a382a4ad..ab0acbe2c 100644
--- a/language/np3_ja_jp/lexer_ja_jp.rc
+++ b/language/np3_ja_jp/lexer_ja_jp.rc
@@ -446,6 +446,7 @@ BEGIN
IDS_LEX_STR_63353 "2 CC͎IMEϊ"
IDS_LEX_STR_63354 "Multi Edit Indicator"
IDS_LEX_STR_63355 "2nd Multi Edit Indicator"
+ IDS_LEX_STR_63356 "Date-Time"
END
#endif // Japanese (Japan) resources
diff --git a/language/np3_ko_kr/lexer_ko_kr.rc b/language/np3_ko_kr/lexer_ko_kr.rc
index 9cded27fc..8cd0ae147 100644
--- a/language/np3_ko_kr/lexer_ko_kr.rc
+++ b/language/np3_ko_kr/lexer_ko_kr.rc
@@ -446,6 +446,7 @@ BEGIN
IDS_LEX_STR_63353 "2nd Inline-IME "
IDS_LEX_STR_63354 "Multi Edit Indicator"
IDS_LEX_STR_63355 "2nd Multi Edit Indicator"
+ IDS_LEX_STR_63356 "Date-Time"
END
#endif // Korean (Korea) resources
diff --git a/language/np3_nl_nl/lexer_nl_nl.rc b/language/np3_nl_nl/lexer_nl_nl.rc
index 34fddd434..95b97bac0 100644
--- a/language/np3_nl_nl/lexer_nl_nl.rc
+++ b/language/np3_nl_nl/lexer_nl_nl.rc
@@ -446,6 +446,7 @@ BEGIN
IDS_LEX_STR_63353 "2nd Inline-IME Color"
IDS_LEX_STR_63354 "Multi Edit Indicator"
IDS_LEX_STR_63355 "2nd Multi Edit Indicator"
+ IDS_LEX_STR_63356 "Date-Time"
END
#endif // Dutch (Netherlands) resources
diff --git a/language/np3_pl_pl/lexer_pl_pl.rc b/language/np3_pl_pl/lexer_pl_pl.rc
index 0a131b3f9..9deeab043 100644
--- a/language/np3_pl_pl/lexer_pl_pl.rc
+++ b/language/np3_pl_pl/lexer_pl_pl.rc
@@ -446,6 +446,7 @@ BEGIN
IDS_LEX_STR_63353 "2nd Inline-IME Color"
IDS_LEX_STR_63354 "Multi Edit Indicator"
IDS_LEX_STR_63355 "2nd Multi Edit Indicator"
+ IDS_LEX_STR_63356 "Date-Time"
END
#endif // Polish (Poland) resources
diff --git a/language/np3_pt_br/lexer_pt_br.rc b/language/np3_pt_br/lexer_pt_br.rc
index 488b02ac6..3a7c2855c 100644
--- a/language/np3_pt_br/lexer_pt_br.rc
+++ b/language/np3_pt_br/lexer_pt_br.rc
@@ -446,6 +446,7 @@ BEGIN
IDS_LEX_STR_63353 "2nd Inline-IME Color"
IDS_LEX_STR_63354 "Multi Edit Indicator"
IDS_LEX_STR_63355 "2nd Multi Edit Indicator"
+ IDS_LEX_STR_63356 "Date-Time"
END
#endif // Portuguese (Brazil) resources
diff --git a/language/np3_ru_ru/lexer_ru_ru.rc b/language/np3_ru_ru/lexer_ru_ru.rc
index 625ca5ad2..fbf4475f3 100644
--- a/language/np3_ru_ru/lexer_ru_ru.rc
+++ b/language/np3_ru_ru/lexer_ru_ru.rc
@@ -446,6 +446,7 @@ BEGIN
IDS_LEX_STR_63353 "2nd Inline-IME Color"
IDS_LEX_STR_63354 "Multi Edit Indicator"
IDS_LEX_STR_63355 "2nd Multi Edit Indicator"
+ IDS_LEX_STR_63356 "Date-Time"
END
#endif // Russian (Russia) resources
diff --git a/language/np3_zh_cn/lexer_zh_cn.rc b/language/np3_zh_cn/lexer_zh_cn.rc
index 12fd2ea32..16374d76d 100644
--- a/language/np3_zh_cn/lexer_zh_cn.rc
+++ b/language/np3_zh_cn/lexer_zh_cn.rc
@@ -446,6 +446,7 @@ BEGIN
IDS_LEX_STR_63353 "ѡ뷨ѡıɫ"
IDS_LEX_STR_63354 "Multi Edit Indicator"
IDS_LEX_STR_63355 "2nd Multi Edit Indicator"
+ IDS_LEX_STR_63356 "Date-Time"
END
#endif // Chinese (Simplified, PRC) resources
diff --git a/np3portableapp/_buildname.txt b/np3portableapp/_buildname.txt
index ee7531390..e698eff6a 100644
--- a/np3portableapp/_buildname.txt
+++ b/np3portableapp/_buildname.txt
@@ -1 +1 @@
-"RC"
+"Oniguruma"
diff --git a/res/Notepad3.exe.manifest.conf b/res/Notepad3.exe.manifest.conf
index 378f64896..cdb30d52b 100644
--- a/res/Notepad3.exe.manifest.conf
+++ b/res/Notepad3.exe.manifest.conf
@@ -3,8 +3,8 @@
- Notepad3 RC
+ Notepad3 Oniguruma
diff --git a/sciXlexers/CharSetX.h b/sciXlexers/CharSetX.h
index e0e776d5a..b0ae3e320 100644
--- a/sciXlexers/CharSetX.h
+++ b/sciXlexers/CharSetX.h
@@ -27,17 +27,24 @@ constexpr bool IsLineBreak(const int ch) noexcept {
return ((ch == '\n') || (ch == '\r'));
}
+inline int IsNumber(const Scintilla::StyleContext& sc) {
+ return Scintilla::IsADigit(sc.ch) || (((sc.ch == '+') || (sc.ch == '-')) && Scintilla::IsADigit(sc.chNext));
+}
+
constexpr int IsNumHex(const Scintilla::StyleContext& sc) noexcept {
- return (sc.chNext == 'x') || (sc.chNext == 'X');
+ return (sc.ch == '0') && (sc.chNext == 'x') || (sc.chNext == 'X');
}
constexpr int IsNumBinary(const Scintilla::StyleContext& sc) noexcept {
- return (sc.chNext == 'b') || (sc.chNext == 'B');
+ return (sc.ch == '0') && (sc.chNext == 'b') || (sc.chNext == 'B');
}
-
inline int IsNumOctal(const Scintilla::StyleContext& sc) {
- return Scintilla::IsADigit(sc.chNext) || (sc.chNext == 'o');
+ return (sc.ch == '0') && (sc.chNext == 'o') || (sc.chNext == 'O');
+}
+
+inline int IsNumExponent(const Scintilla::StyleContext& sc) {
+ return Scintilla::IsADigit(sc.ch) && ((sc.chNext == 'e') || (sc.chNext == 'E'));
}
inline bool IsAIdentifierChar(const int ch) {
diff --git a/sciXlexers/LexTOML.cxx b/sciXlexers/LexTOML.cxx
index 568051fcd..5dd65c27d 100644
--- a/sciXlexers/LexTOML.cxx
+++ b/sciXlexers/LexTOML.cxx
@@ -54,24 +54,6 @@ namespace {
return SCE_TOML_VALUE;
}
- inline bool IsFuncName(const char* str) {
- const char* identifiers[] = {
- "proc",
- "func",
- "macro",
- "method",
- "template",
- "iterator",
- "converter"
- };
- for (const char* id : identifiers) {
- if (strcmp(str, id) == 0) {
- return true;
- }
- }
- return false;
- }
-
struct OptionsTOML {
bool fold;
bool foldCompact;
@@ -82,8 +64,8 @@ namespace {
}
};
- static const char* const tomlWordListDesc[] = {
- "TOML",
+ static const char* const tomlWordListsDesc[] = {
+ "Keyword",
nullptr
};
@@ -93,34 +75,46 @@ namespace {
DefineProperty("fold", &OptionsTOML::fold, "FOLD COMMENT");
DefineProperty("fold.compact", &OptionsTOML::foldCompact, "FOLDCOMPACT COMMENT");
- DefineWordListSets(tomlWordListDesc);
+ DefineWordListSets(tomlWordListsDesc);
}
};
LexicalClass lexicalClasses[] = {
// Lexer TOML SCLEX_TOML SCE_TOML_:
0, "SCE_TOML_DEFAULT", "default", "Default",
- 1, "SCE_TOML_COMMENT", "comment", "Comment",
- 2, "SCE_TOML_KEY", "key", "Key",
+ 1, "SCE_TOML_KEYWORD", "keyword", "Keyword",
+ 2, "SCE_TOML_COMMENT", "comment", "Comment",
3, "SCE_TOML_SECTION", "section", "Section",
- 4, "SCE_TOML_ASSIGNMENT", "assignment", "Assignment",
- 5, "SCE_TOML_DEFVAL", "default value", "Default Value",
- 6, "SCE_TOML_VALUETYPE", "value type", "Value Type",
- 7, "SCE_TOML_PARSINGERROR", "type error", "Type Error",
+ 4, "SCE_TOML_KEY", "key", "Key",
+ 5, "SCE_TOML_ASSIGNMENT", "assignment", "Assignment",
+ 6, "SCE_TOML_VALUE", "value", "Value",
+ 7, "SCE_TOML_NUMBER", "number", "Number",
+ 8, "SCE_TOML_STR_BASIC", "string_basic", "Basic String",
+ 9, "SCE_TOML_STR_LITERAL", "string_basic", "Literal String",
+ 10, "SCE_TOML_PARSINGERROR", "type_error", "Type Error",
};
} // end of namespace
class LexerTOML : public DefaultLexer {
- CharacterSet setWord;
+
+ CharacterSet validKey;
+ //CharacterSet validKeyWord;
+ CharacterSet validNumberEnd;
+ CharacterSet chDateTime;
+
WordList keywords;
+
OptionsTOML options;
OptionSetTOML osTOML;
public:
LexerTOML()
: DefaultLexer(lexicalClasses, ELEMENTS(lexicalClasses))
- , setWord(CharacterSet::setAlphaNum, "_", 0x80, true)
+ , validKey(CharacterSet::setAlphaNum, R"(-_.)", 0x80, false)
+ //, validKeyWord(CharacterSet::setAlphaNum, "_", 0x80, false)
+ , validNumberEnd(CharacterSet::setNone, " \t\n\v\f\r#,)}]", 0x80, false)
+ , chDateTime(CharacterSet::setNone, "-:TZ", 0x80, false)
{ }
virtual ~LexerTOML() { }
@@ -169,11 +163,8 @@ public:
// --------------------------------------------------------------------------
Sci_Position SCI_METHOD PropertySet(const char* key, const char* val) override;
-
Sci_Position SCI_METHOD WordListSet(int n, const char* wl) override;
-
void SCI_METHOD Lex(Sci_PositionU startPos, Sci_Position length, int initStyle, IDocument* pAccess) override;
-
void SCI_METHOD Fold(Sci_PositionU startPos, Sci_Position length, int initStyle, IDocument* pAccess) override;
};
@@ -202,7 +193,6 @@ Sci_Position SCI_METHOD LexerTOML::WordListSet(int n, const char* wl)
if (wordListN) {
WordList wlNew;
wlNew.Set(wl);
-
if (*wordListN != wlNew) {
wordListN->Set(wl);
firstModification = 0;
@@ -225,51 +215,117 @@ constexpr bool IsAssignChar(const int ch) noexcept {
}
// ----------------------------------------------------------------------------
-inline bool IsAKeyChar(const int ch) {
- return (IsAlphaNumeric(ch) || ch == '_');
-}
-// ----------------------------------------------------------------------------
-
-
-static int GetBracketLevel(StyleContext& sc)
+static int GetBracketLevel(StyleContext& sc, const bool stopAtLnBreak = false)
{
Sci_Position const posCurrent = static_cast(sc.currentPos);
- bool ignore = false;
int iBracketLevel = -1;
+ int inInlTbl = 0;
Sci_Position i = 0;
- while ((--i + posCurrent) >= 0)
+ while (((--i + posCurrent) >= 0))
{
- if (sc.GetRelative(i) == '"') {
- ignore = !ignore; // toggle string
+ int const ch = sc.GetRelative(i);
+
+ if (stopAtLnBreak && IsLineBreak(ch)) {
+ break;
}
- else if (!ignore) {
- if (IsAssignChar(sc.GetRelative(i))) {
- break; // must be within assignment
- }
- else if (sc.GetRelative(i) == ']') {
- --iBracketLevel;
- }
- else if (sc.GetRelative(i) == '[') {
- ++iBracketLevel;
- }
+
+ if (ch == '}') {
+ ++inInlTbl;
+ }
+ else if (ch == '{') {
+ --inInlTbl;
+ }
+
+ if (IsAssignChar(ch) && (inInlTbl == 0)) {
+ break; // must be the assignment begin
+ }
+ else if (ch == ']') {
+ --iBracketLevel;
+ }
+ else if (ch == '[') {
+ ++iBracketLevel;
}
}
return iBracketLevel;
}
// ----------------------------------------------------------------------------
+static bool IsDateTimeStr(StyleContext& sc, const CharacterSet& validCh, const CharacterSet& valEnd)
+{
+ Sci_Position const posCurrent = static_cast(sc.currentPos);
+ Sci_Position const posEnd = static_cast(sc.lineStartNext);
+ Sci_Position i = 0;
+ bool bDateTimeFlag = false;
+
+ while ((++i + posCurrent) < posEnd)
+ {
+ int const ch = sc.GetRelative(i);
+
+ if (!Scintilla::IsADigit(ch) && !validCh.Contains(ch) && (ch != '.')) {
+ if (valEnd.Contains(ch)) {
+ return bDateTimeFlag;
+ }
+ else {
+ return false;
+ }
+ }
+ if (validCh.Contains(ch)) {
+ bDateTimeFlag = true;
+ }
+ }
+ return bDateTimeFlag;
+}
+// ----------------------------------------------------------------------------
+
+
+static bool IsLookAheadLineEmpty(StyleContext& sc)
+{
+ Sci_Position const posCurrent = static_cast(sc.currentPos);
+ Sci_Position const posEnd = static_cast(sc.lineStartNext);
+
+ Sci_Position i = 0;
+ bool bLHLineEmpty = true;
+
+ while ((++i + posCurrent) < posEnd)
+ {
+ int const ch = sc.GetRelative(i);
+
+ if (!Scintilla::IsASpace(ch)) {
+ if (IsCommentChar(ch)) {
+ break; // ignore rest of line
+ }
+ bLHLineEmpty = false;
+ break;
+ }
+ }
+ return bLHLineEmpty;
+}
+// ----------------------------------------------------------------------------
+
+
+
+// ----------------------------------------------------------------------------
void SCI_METHOD LexerTOML::Lex(Sci_PositionU startPos, Sci_Position length, int initStyle, IDocument* pAccess)
{
Accessor styler(pAccess, nullptr);
StyleContext sc(startPos, length, initStyle, styler);
+ bool inSQuotedKey = false;
+ bool inDQuotedKey = false;
+ bool inInnerQKey = false;
+
bool inSectionDef = false;
- bool inMultiLnString = (sc.state == SCE_TOML_STRING);
- bool inMultiLnArrayDef = (sc.state == SCE_TOML_ARRAY);
+
+ bool inMultiLnString = (sc.state == SCE_TOML_STR_BASIC) || (sc.state == SCE_TOML_STR_LITERAL);
+ bool inMultiLnArrayDef = false;
+
+ bool inHex = false;
+ bool inBin = false;
+ bool inOct = false;
for (; sc.More(); sc.Forward())
{
@@ -278,23 +334,26 @@ void SCI_METHOD LexerTOML::Lex(Sci_PositionU startPos, Sci_Position length, int
// check if in the middle of a line continuation ...
// --------------------------------------------------
if (sc.atLineStart) {
+ inMultiLnArrayDef = (GetBracketLevel(sc) >= 0);
+ inSQuotedKey = inDQuotedKey = inInnerQKey = false; // clear
switch (sc.state)
{
- case SCE_TOML_STRING:
+ case SCE_TOML_STR_BASIC:
+ case SCE_TOML_STR_LITERAL:
if (!inMultiLnString) {
sc.SetState(SCE_TOML_PARSINGERROR);
}
break;
- case SCE_TOML_ARRAY:
- if (!inMultiLnArrayDef) {
- sc.SetState(SCE_TOML_PARSINGERROR);
- }
+ case SCE_TOML_ASSIGNMENT:
+ sc.SetState(SCE_TOML_PARSINGERROR);
break;
case SCE_TOML_PARSINGERROR:
// preserve error
break;
default:
- sc.SetState(SCE_TOML_DEFAULT); // reset
+ if (!inMultiLnArrayDef) {
+ sc.SetState(SCE_TOML_DEFAULT); // reset
+ }
break;
}
}
@@ -339,21 +398,35 @@ void SCI_METHOD LexerTOML::Lex(Sci_PositionU startPos, Sci_Position length, int
sc.SetState(SCE_TOML_SECTION);
inSectionDef = true;
}
- else if (IsAKeyChar(sc.ch)) {
+ else if (validKey.Contains(sc.ch)) {
sc.SetState(SCE_TOML_KEY);
}
- else {
- sc.SetState(SCE_TOML_PARSINGERROR);
+ else { // not valid - maybe quoted
+ if (sc.ch == '"') {
+ inDQuotedKey = true;
+ sc.SetState(SCE_TOML_KEY);
+ }
+ else if (sc.ch == '\'') {
+ inSQuotedKey = true;
+ sc.SetState(SCE_TOML_KEY);
+ }
+ else {
+ sc.SetState(SCE_TOML_PARSINGERROR);
+ }
}
break;
+
case SCE_TOML_COMMENT:
// eat - rest of line is comment
break;
+
case SCE_TOML_SECTION:
if (sc.ch == ']') {
- inSectionDef = false;
+ if (GetBracketLevel(sc, true) == 0) {
+ inSectionDef = false;
+ }
}
else if (IsCommentChar(sc.ch)) {
if (!inSectionDef) {
@@ -365,24 +438,65 @@ void SCI_METHOD LexerTOML::Lex(Sci_PositionU startPos, Sci_Position length, int
}
break;
+
case SCE_TOML_KEY:
- if (IsASpaceOrTab(sc.ch)) {
- sc.SetState(SCE_TOML_ASSIGNMENT); // end of key
+ if ((sc.ch == '"') && inDQuotedKey) {
+ if (inInnerQKey) {
+ sc.SetState(SCE_TOML_PARSINGERROR);
+ }
+ else {
+ sc.ForwardSetState(SCE_TOML_ASSIGNMENT); // end of key
+ }
+ }
+ else if ((sc.ch == '\'') && inSQuotedKey) {
+ if (inInnerQKey) {
+ sc.SetState(SCE_TOML_PARSINGERROR);
+ }
+ else {
+ sc.ForwardSetState(SCE_TOML_ASSIGNMENT); // end of key
+ }
+ }
+ else if (IsASpaceOrTab(sc.ch)) {
+ if (!(inSQuotedKey || inDQuotedKey || inInnerQKey)) {
+ sc.SetState(SCE_TOML_ASSIGNMENT); // end of key
+ }
+ // else eat
}
else if (IsAssignChar(sc.ch)) {
- sc.SetState(SCE_TOML_ASSIGNMENT);
+ if (!(inSQuotedKey || inDQuotedKey || inInnerQKey)) {
+ sc.SetState(SCE_TOML_ASSIGNMENT);
+ }
+ // else eat
}
- else if (!IsAKeyChar(sc.ch)) {
- sc.SetState(SCE_TOML_PARSINGERROR);
+ else if (validKey.Contains(sc.ch)) {
+ // eat
+ }
+ else {
+ if ((sc.ch == '"') && inSQuotedKey) {
+ inInnerQKey = !inInnerQKey; //toggle
+ }
+ else if ((sc.ch == '\'') && inDQuotedKey) {
+ inInnerQKey = !inInnerQKey; //toggle
+ }
+ else if (!(inSQuotedKey || inDQuotedKey || inInnerQKey)) {
+ sc.SetState(SCE_TOML_PARSINGERROR);
+ }
+ // else eat
}
break;
+
case SCE_TOML_ASSIGNMENT:
if (IsAssignChar(sc.ch)) {
- sc.ForwardSetState(SCE_TOML_VALUE);
+ if (!IsLookAheadLineEmpty(sc)) {
+ sc.ForwardSetState(SCE_TOML_VALUE);
+ }
+ else {
+ sc.SetState(SCE_TOML_PARSINGERROR);
+ }
// fall through case SCE_TOML_VALUE:
}
- else if (IsASpaceOrTab(sc.ch)) {
+ else if (IsASpace(sc.ch)) {
break; // OK
}
else {
@@ -393,48 +507,11 @@ void SCI_METHOD LexerTOML::Lex(Sci_PositionU startPos, Sci_Position length, int
case SCE_TOML_VALUE:
if (sc.ch == '[') {
- sc.SetState(SCE_TOML_ARRAY);
inMultiLnArrayDef = true;
}
else if (sc.ch == ']') {
- sc.SetState(SCE_TOML_PARSINGERROR);
- }
- else if (sc.ch == '"') {
- sc.SetState(SCE_TOML_STRING);
- if (sc.Match(R"(""")")) {
- inMultiLnString = true;
- sc.Forward(2);
- }
- }
- break;
-
- case SCE_TOML_STRING:
- if (sc.ch == '\\') {
- sc.ForwardSetState(SCE_TOML_STRING);
- }
- else if (sc.ch == '"') {
- if (!inMultiLnString) {
- sc.ForwardSetState(SCE_TOML_VALUE);
- }
- else {
- // inMultiLnString
- if (sc.Match(R"(""")")) {
- sc.Forward(2);
- sc.ForwardSetState(SCE_TOML_VALUE);
- inMultiLnString = false;
- }
- else {
- sc.SetState(SCE_TOML_PARSINGERROR);
- }
- }
- }
- break;
-
- case SCE_TOML_ARRAY:
- if (sc.ch == ']') {
int const level = GetBracketLevel(sc);
if (level == 0) {
- sc.ForwardSetState(SCE_TOML_VALUE);
inMultiLnArrayDef = false;
}
else if (level < 0) {
@@ -442,20 +519,158 @@ void SCI_METHOD LexerTOML::Lex(Sci_PositionU startPos, Sci_Position length, int
inMultiLnArrayDef = false;
}
}
+ else if (IsNumber(sc)) {
+ if (IsDateTimeStr(sc, chDateTime, validNumberEnd)) {
+ sc.SetState(SCE_TOML_DATETIME);
+ }
+ else {
+ sc.SetState(SCE_TOML_NUMBER);
+ if ((sc.ch == '+') || (sc.ch == '-')) {
+ sc.Forward();
+ }
+ inHex = IsNumHex(sc);
+ inBin = IsNumBinary(sc);
+ inOct = IsNumOctal(sc);
+ if (inHex || inBin || inOct) {
+ sc.Forward(2);
+ }
+ if (IsNumExponent(sc)) {
+ sc.Forward(2);
+ if ((sc.ch == '+') || (sc.ch == '-')) {
+ sc.Forward();
+ }
+ }
+ }
+ }
+ else if (sc.ch == '"') {
+ sc.SetState(SCE_TOML_STR_BASIC);
+ if (sc.Match(R"(""")")) {
+ inMultiLnString = true;
+ sc.Forward(2);
+ }
+ }
+ else if (sc.ch == '\'') {
+ sc.SetState(SCE_TOML_STR_LITERAL);
+ if (sc.Match(R"(''')")) {
+ inMultiLnString = true;
+ sc.Forward(2);
+ }
+ }
break;
- case SCE_TOML_PARSINGERROR:
- // still parsing error until new line
+
+ case SCE_TOML_NUMBER:
+ if (sc.ch == '_') {
+ // eat // TODO: only once
+ }
+ else if (inHex || inBin || inOct) {
+ if (validNumberEnd.Contains(sc.ch)) {
+ sc.SetState(SCE_TOML_VALUE);
+ inHex = false;
+ inBin = false;
+ inOct = false;
+ }
+ else {
+ if ((inHex && !IsADigit(sc.ch, 16)) ||
+ (inBin && !IsADigit(sc.ch, 2)) ||
+ (inOct && !IsADigit(sc.ch, 8)))
+ {
+ sc.SetState(SCE_TOML_PARSINGERROR);
+ }
+ }
+ }
+ else if (IsNumExponent(sc)) {
+ sc.Forward();
+ if ((sc.chNext == '+') || (sc.chNext == '-')) {
+ sc.Forward();
+ }
+ }
+ else if (sc.ch == '.') {
+ // eat // TODO: only once
+ }
+ else if (IsADigit(sc.ch)) {
+ // eat
+ }
+ else {
+ if (validNumberEnd.Contains(sc.ch)) {
+ sc.SetState(SCE_TOML_VALUE);
+ inHex = false;
+ inBin = false;
+ inOct = false;
+ }
+ else {
+ sc.SetState(SCE_TOML_PARSINGERROR);
+ }
+ }
break;
+
+ case SCE_TOML_DATETIME:
+ if (!IsADigit(sc.ch) && !chDateTime.Contains(sc.ch) && (sc.ch != '.')) {
+ if (validNumberEnd.Contains(sc.ch)) {
+ sc.SetState(SCE_TOML_VALUE);
+ }
+ else {
+ sc.SetState(SCE_TOML_PARSINGERROR);
+ }
+ }
+ break;
+
+
+ case SCE_TOML_STR_BASIC:
+ case SCE_TOML_STR_LITERAL:
+ if (sc.ch == '"') {
+ if (sc.state == SCE_TOML_STR_BASIC) {
+ if (sc.chPrev != '\\') {
+ if (!inMultiLnString) {
+ sc.ForwardSetState(SCE_TOML_VALUE);
+ }
+ else {
+ // inMultiLnString
+ if (sc.Match(R"(""")")) {
+ sc.Forward(2);
+ sc.ForwardSetState(SCE_TOML_VALUE);
+ inMultiLnString = false;
+ }
+ }
+ }
+ }
+ }
+ else if (sc.ch == '\'') {
+ if (sc.state == SCE_TOML_STR_LITERAL) {
+ if (!inMultiLnString) {
+ sc.ForwardSetState(SCE_TOML_VALUE);
+ }
+ else {
+ // inMultiLnString
+ if (sc.Match(R"(''')")) {
+ sc.Forward(2);
+ sc.ForwardSetState(SCE_TOML_VALUE);
+ inMultiLnString = false;
+ }
+ }
+ }
+ }
+ break;
+
+
+ case SCE_TOML_PARSINGERROR:
+ // keep parsing error until new line
+ break;
+
+
default:
sc.SetState(SCE_TOML_PARSINGERROR); // unknown
break;
}
- //if (sc.atLineEnd) {
- // // ---
- //}
+ //~if (sc.atLineEnd) {
+ //~ if (!inMultiLnArrayDef && !inMultiLnString) {
+ //~ if (sc.state == SCE_TOML_VALUE) {
+ //~ sc.ForwardSetState(SCE_TOML_DEFAULT);
+ //~ }
+ //~ }
+ //~}
}
sc.Complete();
@@ -550,7 +765,7 @@ void SCI_METHOD LexerTOML::Fold(Sci_PositionU startPos, Sci_Position length, int
}
// ----------------------------------------------------------------------------
-LexerModule lmTOML(SCLEX_TOML, LexerTOML::LexerFactoryTOML, "toml", tomlWordListDesc);
+LexerModule lmTOML(SCLEX_TOML, LexerTOML::LexerFactoryTOML, "toml", tomlWordListsDesc);
// ----------------------------------------------------------------------------
diff --git a/sciXlexers/SciXLexer.h b/sciXlexers/SciXLexer.h
index d8138df0a..972fba9a8 100644
--- a/sciXlexers/SciXLexer.h
+++ b/sciXlexers/SciXLexer.h
@@ -43,14 +43,17 @@
#define SCE_TOML_DEFAULT 0
-#define SCE_TOML_COMMENT 1
-#define SCE_TOML_SECTION 2
-#define SCE_TOML_KEY 3
-#define SCE_TOML_ASSIGNMENT 4
-#define SCE_TOML_VALUE 5
-#define SCE_TOML_STRING 6
-#define SCE_TOML_ARRAY 7
-#define SCE_TOML_PARSINGERROR 8
+#define SCE_TOML_KEYWORD 1
+#define SCE_TOML_COMMENT 2
+#define SCE_TOML_SECTION 3
+#define SCE_TOML_KEY 4
+#define SCE_TOML_ASSIGNMENT 5
+#define SCE_TOML_VALUE 6
+#define SCE_TOML_NUMBER 7
+#define SCE_TOML_DATETIME 8
+#define SCE_TOML_STR_BASIC 9
+#define SCE_TOML_STR_LITERAL 10
+#define SCE_TOML_PARSINGERROR 11
#endif //_SCIXLEXER_H_
diff --git a/src/Edit.c b/src/Edit.c
index 922fd5f18..99069895b 100644
--- a/src/Edit.c
+++ b/src/Edit.c
@@ -8326,7 +8326,6 @@ void EditFoldPerformAction(DocLn ln, int mode, FOLD_ACTION action)
else {
fToggled = _FoldToggleNode(ln, action);
}
- if (fToggled) { SciCall_ScrollCaret(); }
}
diff --git a/src/Notepad3.c b/src/Notepad3.c
index 256e6b329..a1629f6f5 100644
--- a/src/Notepad3.c
+++ b/src/Notepad3.c
@@ -3163,7 +3163,7 @@ LRESULT MsgInitMenu(HWND hwnd, WPARAM wParam, LPARAM lParam)
i == SCLEX_SQL || i == SCLEX_PERL || i == SCLEX_PYTHON || i == SCLEX_PROPERTIES ||i == SCLEX_CONF ||
i == SCLEX_POWERSHELL || i == SCLEX_BATCH || i == SCLEX_DIFF || i == SCLEX_BASH || i == SCLEX_TCL ||
i == SCLEX_AU3 || i == SCLEX_LATEX || i == SCLEX_AHKL || i == SCLEX_RUBY || i == SCLEX_CMAKE || i == SCLEX_MARKDOWN ||
- i == SCLEX_YAML || i == SCLEX_REGISTRY || i == SCLEX_NIMROD) && !ro);
+ i == SCLEX_YAML || i == SCLEX_REGISTRY || i == SCLEX_NIMROD || i == SCLEX_TOML) && !ro);
EnableCmd(hmenu, CMD_CTRLENTER, !ro);
EnableCmd(hmenu, IDM_EDIT_INSERT_TAG, !ro);
@@ -4573,6 +4573,7 @@ LRESULT MsgCommand(HWND hwnd, UINT umsg, WPARAM wParam, LPARAM lParam)
case SCLEX_YAML:
case SCLEX_COFFEESCRIPT:
case SCLEX_NIMROD:
+ case SCLEX_TOML:
EditToggleLineComments(Globals.hwndEdit, L"#", true);
break;
case SCLEX_ASM:
@@ -4636,6 +4637,7 @@ LRESULT MsgCommand(HWND hwnd, UINT umsg, WPARAM wParam, LPARAM lParam)
case SCLEX_JSON:
case SCLEX_REGISTRY:
case SCLEX_NIMROD:
+ case SCLEX_TOML:
break;
case SCLEX_HTML:
case SCLEX_XML:
diff --git a/src/StyleLexers/styleLexTOML.c b/src/StyleLexers/styleLexTOML.c
index 4e643c053..4e2cfdead 100644
--- a/src/StyleLexers/styleLexTOML.c
+++ b/src/StyleLexers/styleLexTOML.c
@@ -4,7 +4,7 @@
//KEYWORDLIST KeyWords_TOML = EMPTY_KEYWORDLIST;
KEYWORDLIST KeyWords_TOML = {
- "Keyword",
+ "false inf nan table true", // Keyword
"", "", "", "", "", "", "", "" };
@@ -13,11 +13,14 @@ SCLEX_TOML, IDS_LEX_TOML_CFG, L"TOML Config", L"toml", L"",
&KeyWords_TOML,{
{ {STYLE_DEFAULT}, IDS_LEX_STR_63126, L"Default", L"", L"" },
//{ {SCE_TOML_DEFAULT}, IDS_LEX_STR_63126, L"Default", L"", L"" },
+ { {SCE_TOML_KEYWORD}, IDS_LEX_STR_63128, L"Keyword", L"fore:#E00000", L"" },
{ {SCE_TOML_COMMENT}, IDS_LEX_STR_63127, L"Comment", L"fore:#008000", L"" },
{ {SCE_TOML_SECTION}, IDS_LEX_STR_63232, L"Section", L"bold; fore:#000000; back:#FFF1A8; eolfilled", L"" },
{ {SCE_TOML_KEY}, IDS_LEX_STR_63348, L"Key", L"bold; fore:#5E608F", L"" },
{ {SCE_TOML_ASSIGNMENT}, IDS_LEX_STR_63233, L"Assignment", L"bold; fore:#FF2020", L"" },
{ {SCE_TOML_VALUE}, IDS_LEX_STR_63201, L"Value", L"fore:#202020", L"" },
- { {SCE_TOML_STRING}, IDS_LEX_STR_63131, L"String", L"italic; fore:#800000", L"" },
+ { {SCE_TOML_NUMBER}, IDS_LEX_STR_63130, L"Number", L"fore:#0000E0", L"" },
+ { {SCE_TOML_DATETIME}, IDS_LEX_STR_63356, L"Date-Time", L"fore:#950095", L"" },
+ { {MULTI_STYLE(SCE_TOML_STR_BASIC, SCE_TOML_STR_LITERAL,0,0)}, IDS_LEX_STR_63131, L"String", L"italic; fore:#800000", L"" },
{ {SCE_TOML_PARSINGERROR}, IDS_LEX_STR_63252, L"Parsing Error", L"fore:#FFFF00; back:#A00000", L"" },
EDITLEXER_SENTINEL } };
diff --git a/src/Version.h b/src/Version.h
index 9426d2d95..7e300a1f9 100644
--- a/src/Version.h
+++ b/src/Version.h
@@ -68,7 +68,7 @@
#if defined(_MSC_VER)
#if (_MSC_VER >= 1920)
#if(_MSC_FULL_VER >= 192127702)
- #define VER_CPL MS Visual C++ 2019 v16.1.(0-2)
+ #define VER_CPL MS Visual C++ 2019 v16.1.(0-3)
#elif(_MSC_FULL_VER >= 192027508)
#define VER_CPL MS Visual C++ 2019 v16.0.(0-4)
#elif(_MSC_FULL_VER >= 192027027)
diff --git a/src/VersionEx.h b/src/VersionEx.h
index 25fd8d5f8..f8300f6a8 100644
--- a/src/VersionEx.h
+++ b/src/VersionEx.h
@@ -7,8 +7,8 @@
#define SAPPNAME "Notepad3"
#define VERSION_MAJOR 5
#define VERSION_MINOR 19
-#define VERSION_REV 611
-#define VERSION_BUILD 2250
+#define VERSION_REV 613
+#define VERSION_BUILD 2252
#define SCINTILLA_VER 416
-#define ONIGMO_REGEX_VER 6.2.0
-#define VERSION_PATCH RC
+#define ONIGURUMA_REGEX_VER 6.9.2
+#define VERSION_PATCH Oniguruma
diff --git a/test/txtfiles/AHKL.ahk b/test/txtfiles/AHKL.ahk
new file mode 100644
index 000000000..715d3b540
--- /dev/null
+++ b/test/txtfiles/AHKL.ahk
@@ -0,0 +1,142 @@
+; =============================================================================
+; Regression Tests Notepad3 Gui
+; Needs files in a Test Directory:
+; Notepad3.exe and Notepad3.ini (from distrib)
+; Execute: AutoHotkeyU32.exe "TestAhkNotepad3.ahk"
+; =============================================================================
+#NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases.
+; #Warn ; Enable warnings to assist with detecting common errors.
+SendMode Input ; Recommended for new scripts due to its superior speed and reliability.
+SetWorkingDir %A_ScriptDir% ; Ensures a consistent starting directory.
+SetBatchLines, -1
+StringCaseSense, Off
+CoordMode, Pixel, Screen
+; =============================================================================
+
+v_NP3Name = Notepad3
+v_NP3TestDir = %A_WorkingDir%\_TESTDIR
+v_NP3IniFile = %v_NP3Name%.ini
+
+stdout := FileOpen("*", "w")
+v_ExitCode := 0
+
+; =============================================================================
+
+Run, %v_NP3TestDir%/%v_NP3Name%.exe %v_NP3TestDir%/%v_NP3IniFile%, , UseErrorLevel, v_Notepad3_PID
+v_ErrLevel = %ErrorLevel%
+if (v_ErrLevel != 0)
+{
+ stdout.WriteLine("*** ERROR: " . v_NP3Name . "could not be launched.")
+ v_ExitCode := 1
+ Goto LABEL_END
+}
+; -----------------------------------------------------------------------------
+
+GoSub CHECK_NP3_STARTS
+Sleep, 500
+GoSub CHECK_WIN_TITLE
+Sleep, 500
+GoSub CHECK_ABOUT_BOX
+
+
+Goto LABEL_END
+; =============================================================================
+
+; =============================================================================
+CHECK_NP3_STARTS:
+; check that NP3 starts up
+WinWait ahk_pid %v_Notepad3_PID%, , 10
+v_ErrLevel = %ErrorLevel%
+if (v_ErrLevel != 0)
+{
+ stdout.WriteLine("*** ERROR: " . v_NP3Name . "'s seems not to start in time ???")
+ v_ExitCode := 2
+ Goto LABEL_END
+}
+Return
+; =============================================================================
+
+; =============================================================================
+CHECK_WIN_TITLE:
+; check Main Window Title
+WinGetTitle, v_NP3Title, ahk_pid %v_Notepad3_PID%
+
+IfNotInString, v_NP3Title, %v_NP3Name%
+{
+ v_ExitCode := 3
+ stdout.WriteLine("*** ERROR: " . v_NP3Name . " missing in Title: " . v_NP3Title)
+}
+IfNotInString, v_NP3Title, %v_NP3IniFile%
+{
+ v_ExitCode := 3
+ stdout.WriteLine("*** ERROR: " . v_NP3IniFile . " missing in Title: " . v_NP3Title)
+}
+IfNotInString, v_NP3Title, %v_NP3TestDir%
+{
+ v_ExitCode := 3
+ stdout.WriteLine("*** ERROR: " . v_NP3TestDir . " missing in Title: " . v_NP3Title)
+}
+If (v_ExitCode != 0)
+{
+ Goto LABEL_END
+}
+Return
+; =============================================================================
+
+; =============================================================================
+CHECK_ABOUT_BOX:
+; check About DlgBox
+WinActivate, ahk_pid %v_Notepad3_PID%
+
+; This will select File->Open in Notepad:
+WinMenuSelectItem, ahk_pid %v_Notepad3_PID%, , Help, About...
+
+WinWait, About %v_NP3Name%, , 3
+v_ErrLevel = %ErrorLevel%
+if (v_ErrLevel != 0)
+{
+ v_ExitCode := 4
+ stdout.WriteLine("*** ERROR: " . v_NP3Name . "'s About Box is not displayed!")
+ Goto LABEL_END
+}
+WinActivate ; About Box
+;ControlFocus, OK, About %v_NP3Name%
+ ControlClick, OK, About %v_NP3Name%
+;Send {Enter}
+WinWaitClose, About %v_NP3Name%, , 2
+v_ErrLevel = %ErrorLevel%
+if (v_ErrLevel != 0)
+{
+ v_ExitCode := 5
+ stdout.WriteLine("*** ERROR: " . v_NP3Name . "'s About Box can not be closed!")
+ Goto LABEL_END
+}
+Return
+; =============================================================================
+
+; =============================================================================
+LABEL_END:
+WinClose ahk_pid %v_Notepad3_PID%, , 2
+v_ErrLevel = %ErrorLevel%
+if (v_ErrLevel != 0)
+{
+ v_ExitCode := 99
+ stdout.WriteLine("*** ERROR: " . v_NP3Name . "can not be closed!")
+}
+; -------------------------------------
+WinWaitClose ahk_pid %v_Notepad3_PID%
+v_ErrLevel = %ErrorLevel%
+if (v_ErrLevel != 0)
+{
+ v_ExitCode := 111
+ ; FORCED Kill / HANGUP
+}
+; -------------------------------------
+if (v_ExitCode != 0)
+{
+ stdout.WriteLine("*** ERROR: Testing " . v_NP3Name . " exit with: " . v_ExitCode)
+ ExitApp, %v_ExitCode%
+}
+stdout.WriteLine("Testing " . v_NP3Name . ": All tests PASSED.")
+ExitApp, 0
+; =============================================================================
diff --git a/test/txtfiles/Encoding/Cyril2Korean_mix.txt b/test/txtfiles/Encoding/Cyril2Korean_mix.txt
new file mode 100644
index 000000000..5c14ca742
--- /dev/null
+++ b/test/txtfiles/Encoding/Cyril2Korean_mix.txt
@@ -0,0 +1,12 @@
+п я р с т у Я ж в ь ы з ш э щ ч ъ Ю А Б Ц Д Е Ф Г Х И Й К Л М Н О
+п я р с т у Я ж в ь ы з ш э щ ч ъ Ю А Б Ц Д Е Ф Г Х И Й К Л М Н О
+п я р с т у Я ж в ь ы з ш э щ ч ъ Ю А Б Ц Д Е Ф Г Х И Й К Л М Н О
+
+있을 것이다. 우선 인력 물적교류가 없이 기술교류가 Ю
+있을 것이다. 우선 인력 물적교류가 없이 기술교류가 Ю
+있을 것이다. 우선 인력 물적교류가 없이 기술교류가 Ю
+
+п я р с т у Я ж в ь ы з ш э щ ч ъ Ю А Б Ц Д Е Ф Г Х И Й К Л М Н О
+п я р с т у Я ж в ь ы з ш э щ ч ъ Ю А Б Ц Д Е Ф Г Х И Й К Л М Н О
+п я р с т у Я ж в ь ы з ш э щ ч ъ Ю А Б Ц Д Е Ф Г Х И Й К Л М Н О
+п я р с т у Я ж в ь ы з ш э щ ч ъ Ю А Б Ц Д Е Ф Г Х И Й К Л М Н О
diff --git a/test/txtfiles/Encoding/Cyrillic_ANSI_KOI8-R.txt b/test/txtfiles/Encoding/Cyrillic_ANSI_KOI8-R.txt
new file mode 100644
index 000000000..6acd6bd34
--- /dev/null
+++ b/test/txtfiles/Encoding/Cyrillic_ANSI_KOI8-R.txt
@@ -0,0 +1,12 @@
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/test/txtfiles/korean-Win-949.txt b/test/txtfiles/Encoding/Korean-Win-949.txt
similarity index 100%
rename from test/txtfiles/korean-Win-949.txt
rename to test/txtfiles/Encoding/Korean-Win-949.txt
diff --git a/test/txtfiles/Encoding/empty.txt b/test/txtfiles/Encoding/empty.txt
new file mode 100644
index 000000000..e69de29bb
diff --git a/test/txtfiles/NFO/DEADLINE.NFO b/test/txtfiles/NFO/DEADLINE.NFO
new file mode 100644
index 000000000..94e69e985
--- /dev/null
+++ b/test/txtfiles/NFO/DEADLINE.NFO
@@ -0,0 +1,41 @@
+
+
+
+
+ ۲
+ ۱
+
+ ۲
+ ۲ ۱ ۲
+ ۲ ۲ ۲ ۰ ۲ ۲ ۲ ۲۲ ۲
+ ۲ ۲ ۲ ۲۰ ۲ ۲ ۲ ۲ ۲ ۲ ۲
+ ۲ ۲ ۲ ۲ ۲ ۲ ۲ ۲ ۲ ۲
+ ۲ ۲ ۱ ۲۲ ۲ ۲ ۱ ۱ ۲ ۱
+ ۱ ۱ ۱ ۲ ۱ ۱ ۱ ۱ ۱ ۱ ۲ ۱
+ ۱ ۱ ۱ ۱ ۲ ۱ ۱ ۱ ۰ ۱ ۲ ۱
+ ۱ ۱ ۰ ۱ ۱ ۱ ۱ ۱ ۰ ۱ ۱ ۰
+ ۰ ۰ ۰ ۱ ۰ ۰ ۰ ۰ ۰ ۱ ۰
+ ۰ ۰ ۰ ۰ ۰ ۰ ۰ ۰ ۰ ۰ ۰
+ ۰۰ ۰ ۰ ۰۰ ۰ ۰ ۰
+ ۰ ۰ ۰ ۰
+
+ D E A D L i N E
+
+ NODE I : 416-xxx-xxxx (USR. 28.8k Dual Standard)
+ NODE II : 416-xxx-xxxx (USR. 28.8k Dual Standard)
+ NODE III : 416-xxx-xxxx (USR. 28.8k Dual Standard)
+
+ 0-2 Days OnLy, 4.8 GIG ONLINE!
+ PCB V15.1 CUSTOMIZED!
+
+ Sysop : Lover Boy
+ Management Sysop : Violent Soldier
+ File-Co-Sysop : Urlord; Maverick; John Lennon
+ File-Support : Sidewinder
+ PPe/Hacker Co. : The File Pullutor
+ AnSi Artist : Wolffy Boy
+
+ Distribution Sites : (CAN.) TVB, CAE, CIA, TSC, DEATH
+ (H.K.) SAMUEL WORKS!, NICE BBS!
+
+
diff --git a/test/txtfiles/NFO/PENTIUM.NFO b/test/txtfiles/NFO/PENTIUM.NFO
new file mode 100644
index 000000000..7cc0872fa
--- /dev/null
+++ b/test/txtfiles/NFO/PENTIUM.NFO
@@ -0,0 +1,23 @@
+
+
+ *RiNgDoWn* DOMINATORS WHQ +45 39-660-609! *RiNgDoWn*
+
+ ͻ ͻ ͻ ͻ ͻ ͻ ͻ ͻ
+ ͻ ͼ ͻ ͼ ͼ ͻ
+ ͻ ͻ ͻ ͻ ͻ ͻ
+ ͼ ͼ
+ ͼ
+ ͻ ͼ
+ ͼ ͼ ͼ ͼ ͼ ͼ ͼ ͼ ͼ ͼ
+ The Next Generation of WareZ!
+
+ *RiNgDoWn* DOMINATORS WHQ +45 39-660-609! *RiNgDoWn*
+
+ Sysop: MAGIC
+
+ Node 1 - 16K8 Dual! --^^RINGDOWN^^-- Node 2 - 16K8 Dual!
+ Node 3 - Dominators PRIVATE
+
+ DOMINATORS WORLD HQ!
+ TRSI/FAITH DANISH HQ
+ Nup: SHITFACE
diff --git a/test/txtfiles/NFO/jerry.nfo b/test/txtfiles/NFO/jerry.nfo
new file mode 100644
index 000000000..462d0d709
--- /dev/null
+++ b/test/txtfiles/NFO/jerry.nfo
@@ -0,0 +1,189 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ -ZED NITRO/DEAD WEIGHT-
+
+
+
+
+ IJIJIJIJ
+
+
+
+
+ ۲ ۲ ۲ ۲ ۲ ۲ ۲
+ ߱
+
+ ܰ
+
+
+ ܰ
+ ܱ
+ ߰
+
+
+
+ DEAD WEIGHT Present
+
+ Product...< Tom and Jerry Arcade From Hi Tech Expression >
+
+ Released..< 6/29/93 > Rating....< 4/10 >
+
+ Supplier..< Parity Error > Packaged..< Parity Error >
+
+ Disk/Kb...< 1 Disk / 200 K > Cracker...< None Needed >
+
+ GrafX Support: [x] EGA [x] VGA [ ] SVGA [ ] Windows [ ] None
+ Sound Support: [x] Beeper [x] Adlib [x] Sblaster [x] Roland [ ] None
+
+
+
+
+
+
+
+ İ[ Release Note ]Ŀ
+
+ From the makers of Rollerblade Racer. It is an arcade game based
+ upon the Tom and Jerry cartoon series. It is a nintendo like
+ horizontal movement game where you collect hearts and all that,
+ just like all those nintendo games. Anyway, will put out docs for it
+ shortly.
+
+
+
+ Greetings goes to: FaCeLeSS, Dr. Detergent
+ : Group Greets to: Razor 1911, THG, TDT, Skillion, Public Enemy :
+ | Courier Groups: SWAT, United couriers, Exodus, Malice |
+ İİ
+
+ D.E.A.D W.E.I.G.H.T
+
+ [ SR.STAFF ]
+
+ Capt Bligh , Parity Error
+
+ [ MEMBERS ]
+
+ Boba Fett , Dark Spectre , Fletch , Neuro Basher
+ Sir Real , Stingray , Tank , Zed Nitro
+
+ [ Courier Coordinator ]
+
+ General Protocol, CyberChrist
+
+ [ COURIERS ]
+
+ Dark Spyre, Loki, Lord Cyric, The Invid, Blackie
+ Dealer, Kinky o Nepal, Keef Steel, Black Widow
+ NightShade, StormBlade, Weapon X, The Cardinal
+ Der Schatten, MEGA, The Plague, Maniac, Sonic, Sox
+
+
+
+
+
+
+
+ İ[ DEAD WEIGHT BOARDS ]İĿ
+ Name Number w/Nodes Sysop(s) Position
+ IJIJ
+
+ [ All HQs ]
+
+ THE BOUNTY XXX-XXX-XXXX 1 Capt Bligh WORLD HQ
+ : METAL ADDICTION 514-XXX-XXXX 1 Zed Nitro CANADIAN HQ :
+ | STREET SPYDRS 713-XXX-XXXX 4 Maverick COURIER HQ |
+ | UNDERGROUND PUB +358-X-XXXXXX 1 Kinky o Nepal FINLAND HQ |
+ İİĴ
+ [ MEMBER BOARDS ]
+ Ĵ
+ Distant Lands 613-XXX-XXXX 1 General Prot. Member Board
+ Ride The Ligntening 713-852-2928 1 Stingray Member Board
+ Bad Medicine 604-XXX-XXXX 2 Boba Fett Member Board
+ Ĵ
+ [ SITES ]
+ Ĵ
+ Alien Nation 813-493-1871 1 Evil Enforcer Dist. Site
+ Bedlam 313-699-2718 3 Mr.Bill Dist. Site
+ Enchanted Grove 502-893-7414 1 Draken Dist. Site
+ Jurassic Park 619-756-5229 1 Targa Dist. Site
+ Outland BBS 509-468-9808 1 Gadget Dist. Site
+ The Trash Heap 405-751-1604 1 Greaser Dist. Site
+ Underground Oasis 201-818-4894 3 Mister Twister Dist. Site
+ Vanishing Point 604-599-5711 1 Kodiak Dist. Site
+
+
+ PLEASE NOTE
+
+ We are now accepting applications, please pick up an appcliation at
+ any DEAD WEIGHT HQ , or contact us at our P.O.Box
+
+
+ DEAD WEIGHT
+ P.O Box 6623
+ Katy, TX 77491-6623
+
+
+ Or Call:
+
+ Ride The Lightning
+ (713)852-2928
+ V32bis Only
+
+ Name: Guest
+ Password: Wannabe
+
+
+ Or Call:
+
+ 1-800-333-4876 Extension 301
+ and leave a message on our VMB
+ Be sure to leave a voice number
+ where you can be reached.
+
+
+
+
+
+
+
+
diff --git a/test/txtfiles/NFO/test.nfo b/test/txtfiles/NFO/test.nfo
new file mode 100644
index 000000000..fe2c83356
--- /dev/null
+++ b/test/txtfiles/NFO/test.nfo
@@ -0,0 +1,26 @@
+
+ ͻ
+
+
+
+
+ Test
+
+
+
+
+ ͼ
+
+ Lorem ipsum dolor sit amet, consetetur sadipscing elitr,
+ sed diam nonumy eirmod tempor invidunt ut labore et dolore
+ magna aliquyam erat, sed diam voluptua.
+ At vero eos et accusam et justo duo dolores et ea rebum.
+ Stet clita kasd gubergren, no sea takimata sanctus est
+ Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet,
+ consetetur sadipscing elitr,
+ sed diam nonumy eirmod tempor invidunt ut labore et
+ dolore magna aliquyam erat, sed diam voluptua.
+ At vero eos et accusam et justo duo dolores et ea rebum.
+ Stet clita kasd gubergren, no sea takimata sanctus est
+ Lorem ipsum dolor sit amet.
+
\ No newline at end of file
diff --git a/test/txtfiles/NFO/wwc94.nfo b/test/txtfiles/NFO/wwc94.nfo
new file mode 100644
index 000000000..01727ae0f
--- /dev/null
+++ b/test/txtfiles/NFO/wwc94.nfo
@@ -0,0 +1,148 @@
+
+ ߱ ߲߱ ߲ ߰
+ ߱
+ ۲ ۲ ۲
+ ܰ
+ ݰ۲ ݰݰ۲ ݰ ݰ
+ ۲ ۲ ۲ ۲
+ ۱ݲ۲ ۱ݲ۲ ݲ
+ ۱ ۰ ۱ ۰ ݱ
+ ݰް۲ݰ ݰް۲ݰݰް ް
+ ޱܱܱ߱ ޱܱܱ߱ ޱ ߱
+ ۲ ۲ ܲ
+ ޱ ޱ ߰ ED
+ ߲ iCE
+
+ - ] W O R L D W I D E C O U R I E R S [ -
+ " Join the rising force in PC Couriering "
+
+ ** WORLD WIDE **
+
+
+ ۱ܰ E M B E R S ۲۲
+ ߲ ۲
+
+
+ ۰
+
+ S E N I O R S T A F F
+ \
+ SHADOWKEEPER COOKIE MONSTER EXTRA CREDIT ۰
+
+
+
+ ۱ܰWORLD WIDE COURIERS '94۲۲
+ ߲ ۲
+
+
+
+ ۱ܰ ۲۲
+ ߲ O U R I E R S ۲
+
+
+
+ ۰
+ KRYPTON POLARIS BUSTER HYMAN MYXLPLIX THE HOBBIT
+ DR. STUPID MR. EMT iMAGE THE PROWLER RAVEN AGENT-X ۰
+ ZONE MASTER CASTOR SOUL LEADER KNIGHT SABER
+
+ ۰
+ C O U R I E R C O O R D I N A T O R S
+ \
+ WORLD WIDE COURIERING '94 CREW ۰
+
+ S I T E C O O R D I N A T O R S
+ \
+
+ ۰
+ ۰
+
+ ۱ܰWORLD WIDE COURIERS '94۲۲
+ ߲ ۲
+
+
+
+ H E A D Q U A R T E R S
+
+
+ THE GRAVE YARD (World) (xXx)XxX-xXxX ShadowKeeper
+ THE BACK ROOM (Eastern) (xXx)XxX-xXxX Nomadd
+ SHADOW REALM (Canadian) (xXx)XxX-xXxX Shadow Hunter
+
+
+
+
+
+
+
+ H E A D Q U A R T E R S
+
+ THE GRAVEYARD (World) 2 NODES XXX.XXX.XXXX ShadowKeeper
+ THE BACK ROOM (Eastern) 2 NODES XXX.XXX.XXXX Nomadd
+ SHADOW REALM (Canadian) XXX.XXX.XXXX Shadow Hunter
+
+
+ U S D I S T R I B U T I O N S I T E S
+
+ 11TH HOUR BBS 7 NODES 313.XXX.XXXX Marco Polo
+ FADE TO BLACK 2 NODES 612.XXX.XXXX Ningauble
+ LEGATO TIMES 2 NODES 702.XXX.XXXX Sonny
+ X MARKS THE SPOT 909.XXX.XXXX The Armored Saint
+ DEAD MAN'S BLUFF 310.XXX.XXXX The Overlord
+ SEA OF HATE 319.XXX.XXXX Toilet Bowl
+ CABLE ACCESS CHANNEL 10 513.XXX.XXXX Wayne
+ INTOXIFORNICATION 713.XXX.XXXX Hi Fi Del
+ KISS OF DEATH 518.XXX.XXXX Rogue
+ OPTICAL XEROX 314.XXX.XXXX Druidic Priest
+ GROUND ZERO 4 NODES 707.XXX.XXXX Tagger
+
+
+ C A N A D I A N D I S T R I B U T I O N
+
+ BOILING NITROGEN 416.XXX.XXXX Hoodlem
+ HYDROGEN PLACE 613.XXX.XXXX Lord Nuke
+ THE GARDEN 705.XXX.XXXX Death Carnage
+
+ E U R O D I S T R I B U T I O N
+ Information Not Avilable
+
+ M O R E S I T E S - C O M I N G S O O N!
+
+
+
+
+ R e a c h i n g O u t A c r o s s T h e W o r l d !
+
+
+
+
+
+
+
+
+
+
+ LogaN/iCE
+ ۲ ۲
+ ۱ ۱
+ ۰ ۰
+
+ W o r l d W i d e C o u r i e r s
+
+ NEWS/INFORMATION
+
+
+
+ Interested in becoming a Site or a Courier for WWC;
+ Contact Extra Credit on any of the WWC HQ's. If you can't
+ get onto these boards then your not worthy of becoming a courier
+ or a site. You can leave Extra Credit E-mail at 714-999-5556,
+ leave him mail at the matrix prompt.
+
+ Greets: UC, SpectruM, QuantuM, CrimsoN, RiSC
+ THG, iNC, TDT, TRSI, PTG, RZR, FLT, PiL, PE, NX, MGK, RGB, and you!
+
+
+
+ (c) WWC '94
+
diff --git a/test/txtfiles/Registry.reg b/test/txtfiles/Registry.reg
new file mode 100644
index 000000000..8349ae37e
Binary files /dev/null and b/test/txtfiles/Registry.reg differ
diff --git a/test/txtfiles/Rust.rs b/test/txtfiles/Rust.rs
new file mode 100644
index 000000000..7036b1588
Binary files /dev/null and b/test/txtfiles/Rust.rs differ
diff --git a/test/txtfiles/TOML.toml b/test/txtfiles/TOML.toml
new file mode 100644
index 000000000..5f9171e35
--- /dev/null
+++ b/test/txtfiles/TOML.toml
@@ -0,0 +1,339 @@
+# This is a TOML document. - encoding:UTF-8
+
+title = "TOML Example"
+
+[owner]
+name = "Tom Preston-Werner"
+dob = 1979-05-27T07:32:00-08:00 # First class dates
+
+[database]
+server = "192.168.1.1"
+ports = [ 8001, 8001, 8002 ]
+connection_max = 5000
+enabled = true
+
+[servers]
+
+ # Indentation (tabs and/or spaces) is allowed but not required
+ [servers.alpha]
+ ip = "10.0.0.1"
+ dc = "eqdc10"
+
+ [servers.beta]
+ ip = "10.0.0.2"
+ dc = "eqdc10"
+
+[clients]
+data = [ ["gamma", "delta"], [1, 2] ]
+
+[keys]
+
+key = "value"
+key = # INVALID
+key = "value"
+bare_key = "value"
+bare-key = "value"
+1234 = "value"
+
+"127.0.0.1" = "value"
+"character encoding" = "value"
+"ʎǝʞ" = "value"
+'key2' = "value"
+'quoted "value"' = "value"
+
+
+[strings]
+str = "I'm a string. \"You can quote me\". Name\tJos\u00E9\nLocation\tSF."
+
+str1 = """
+Roses are red
+Violets are blue"""
+
+# On a Unix system, the above multi-line string will most likely be the same as:
+str2 = "Roses are red\nViolets are blue"
+
+# On a Windows system, it will most likely be equivalent to:
+str3 = "Roses are red\r\nViolets are blue"
+
+# The following strings are byte-for-byte equivalent:
+str1 = "The quick brown fox jumps over the lazy dog."
+
+str2 = """
+The quick brown \
+
+
+ fox jumps over \
+ the lazy dog."""
+
+str3 = """\
+ The quick brown \
+ fox jumps over \
+ the lazy dog.\
+ """
+
+### String Literals ###
+regex2 = '''I [dw]on't need \d{2} apples'''
+
+lines = '''
+The first newline is
+trimmed in raw strings.
+ All other whitespace
+ is preserved.
+'''
+
+# What you see is what you get.
+winpath = 'C:\Users\nodejs\templates'
+winpath2 = '\\ServerX\admin$\system32\'
+quoted = 'Tom "Dubs" Preston-Werner'
+regex = '<\i\c*\s*>'
+
+str4 = """
+Roses are red
+Violets are blue"""
+
+
+[numbers]
+
+int1 = +99
+int2 = 42
+int3 = 0
+int4 = -17
+int5 = 1_000
+int6 = 5_349_221
+int7 = 1_2_3_4_5 # VALID but discouraged
+
+# hexadecimal with prefix `0x`
+hex1 = 0xDEADBEEF
+hex2 = 0xdeadbeef
+hex3 = 0xdead_beef
+
+# octal with prefix `0o`
+oct1 = 0o01234567
+oct2 = 0o755 # useful for Unix file permissions
+
+# binary with prefix `0b`
+bin1 = 0b11010110
+
+# fractional
+flt1 = +1.0
+flt2 = 3.1415
+flt3 = -0.01
+
+# exponent
+flt4 = 5e+22
+flt5 = 1e6
+flt6 = -2E-2
+
+# both
+flt7 = 6.626e-34
+flt8 = 224_617.445_991_228
+# infinity
+sf1 = inf # positive infinity
+sf2 = +inf # positive infinity
+sf3 = -inf # negative infinity
+
+# not a number
+sf4 = nan # actual sNaN/qNaN encoding is implementation specific
+sf5 = +nan # same as `nan`
+sf6 = -nan # valid, actual encoding is implementation specific
+
+# boolean
+bool1 = true
+bool2 = false
+
+[date time]
+
+# Offset Date-Time ( RFC 3339 : http://tools.ietf.org/html/rfc3339 )
+odt1 = 1979-05-27T07:32:00Z
+odt2 = 1979-05-27T00:32:00-07:00
+odt3 = 1979-05-27T00:32:00.999999-07:00
+# readability
+odt4 = 1979-05-27 07:32:00Z
+
+# Local Date-Time (
+ldt1 = 1979-05-27T07:32:00
+ldt2 = 1979-05-27T00:32:00.999999
+
+# Local Date
+ld1 = 1979-05-27
+
+# Local Time
+lt1 = 07:32:00
+lt2 = 00:32:00.999999
+
+[array]
+
+arr1 = [ 1, 2, 3 ]
+arr2 = [ "red", "yellow", "green" ]
+arr3 = [ [ 1, 2 ], [3, 4, 5] ]
+arr4 = [ "all", 'strings', """are the same""", '''type''']
+arr5 = [ [ 1, 2 ], ["a", "b", "c"] ]
+
+arr6 = [ 1, 2.0 ] # INVALID
+
+arr7 = [
+ 1, 2, 3
+]
+
+# Line breaks are OK when inside arrays
+hosts = [
+ "alpha",
+ "omega",
+ "echo" # Comments at evry time
+]
+
+arr8 = [
+ 1,
+ 2, # this is ok
+]
+
+
+# This is a special Section [table] definitions
+[table]
+# Under that, and until the next table or EOF are the key/values of that table.
+# Key/value pairs within tables are not guaranteed to be in any specific order.
+
+[table-1]
+key1 = "some string"
+key2 = 123
+
+[table-2]
+key1 = "another string"
+key2 = 456
+
+[dog."tater.man"]
+type.name = "pug"
+# In JSON land, that would give you the following structure:
+# { "dog": { "tater.man": { "type": { "name": "pug" } } } }
+
+[a.b.c] # this is best practice
+[ d.e.f ] # same as [d.e.f]
+[ g . h . i ] # same as [g.h.i]
+[ j . "ʞ" . 'l' ] # same as [j."ʞ".'l']
+
+# [x] you
+# [x.y] don't
+# [x.y.z] need these
+[x.y.z.w] # for this to work
+
+# DO NOT DO THIS
+
+[a]
+b = 1
+
+[a]
+c = 2
+
+# DO NOT DO THIS EITHER
+
+[a]
+b = 1
+
+[a.b]
+c = 2
+
+# Inline Table
+name = { first = "Tom", last = "Preston-Werner" }
+point = { x = 1, y = 2 }
+animal = { type.name = "pug" }
+
+[name]
+first = "Tom"
+last = "Preston-Werner"
+
+[point]
+x = 1
+y = 2
+
+[animal]
+type.name = "pug"
+
+
+
+# Array of Tables
+[[products]]
+name = "Hammer"
+sku = 738594937
+
+[[products]]
+
+[[products]]
+name = "Nail"
+sku = 284758393
+color = "gray"
+
+# In JSON land, that would give you the following structure:
+# {
+# "products": [
+# { "name": "Hammer", "sku": 738594937 },
+# { },
+# { "name": "Nail", "sku": 284758393, "color": "gray" }
+# ]
+# }
+#
+#
+
+[[fruit]]
+ name = "apple"
+
+ [fruit.physical]
+ color = "red"
+ shape = "round"
+
+ [[fruit.variety]]
+ name = "red delicious"
+
+ [[fruit.variety]]
+ name = "granny smith"
+
+[[fruit]]
+ name = "banana"
+
+ [[fruit.variety]]
+ name = "plantain"
+
+# In JSON land, that would give you the following structure:
+# {
+# "fruit": [
+# {
+# "name": "apple",
+# "physical": {
+# "color": "red",
+# "shape": "round"
+# },
+# "variety": [
+# { "name": "red delicious" },
+# { "name": "granny smith" }
+# ]
+# },
+# {
+# "name": "banana",
+# "variety": [
+# { "name": "plantain" }
+# ]
+# }
+# ]
+# }
+#
+
+# INVALID TOML DOC
+fruit = []
+
+[[fruit]] # Not allowed
+
+# INVALID TOML DOC
+[[fruit]]
+ name = "apple"
+
+ [[fruit.variety]]
+ name = "red delicious"
+
+ # This table conflicts with the previous table
+ [fruit.variety]
+ name = "granny smith"
+
+points = [ { x = 1, y = 2, z = 3 },
+ { x = 7, y = 8, z = 9 },
+ { x = 2, y = 4, z = 8 } ]
+
+
\ No newline at end of file
diff --git a/test/txtfiles/TXT/License.txt b/test/txtfiles/TXT/License.txt
new file mode 100644
index 000000000..7cec00797
--- /dev/null
+++ b/test/txtfiles/TXT/License.txt
@@ -0,0 +1,71 @@
+Notepad3 and MiniPath Copyright © 2008-2016 Rizonesoft, All rights reserved.
+https://www.rizonesoft.com
+
+Redistribution and use in source and binary forms, with or without modification,
+are permitted provided that the following conditions are met:
+
+1. Redistributions of source code must retain the above copyright notice, this
+list of conditions and the following disclaimer.
+2. Redistributions in binary form must reproduce the above copyright notice,
+this list of conditions and the following disclaimer in the documentation and/or
+other materials provided with the distribution.
+3. Neither the name of Florian Balmer nor the names of its contributors may be
+used to endorse or promote products derived from this software without specific
+prior written permission.
+
+ 01 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ 02 ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ 03 WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ 04 DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
+ 05 ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ 06 (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ 07 LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ 08 ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ 09 (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ 10 SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+==================================================
+License for Scintilla and SciTE
+==================================================
+Copyright 1998-2002 by Neil Hodgson
+
+All Rights Reserved
+
+Permission to use, copy, modify, and distribute this software and its
+documentation for any purpose and without fee is hereby granted, provided that
+the above copyright notice appear in all copies and that both that copyright
+notice and this permission notice appear in supporting documentation.
+
+NEIL HODGSON DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
+ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL NEIL
+HODGSON BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY
+DAMAGESWHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
+CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+
+==================================================
+License for Onigmo (Oniguruma-mod) RegEx Engine
+==================================================
+Copyright (c) 2002-2009 K.Kosako
+Copyright (c) 2011-2014 K.Takata
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without modification,
+are permitted provided that the following conditions are met:
+
+1. Redistributions of source code must retain the above copyright notice, this
+list of conditions and the following disclaimer.
+2. Redistributions in binary form must reproduce the above copyright notice,
+this list of conditions and the following disclaimer in the documentation and/or
+other materials provided with the distribution.
+
+THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS "AS IS" AND ANY EXPRESS
+OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT
+SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
+BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
+IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY
+OF SUCH DAMAGE.
\ No newline at end of file
diff --git a/test/txtfiles/TXT/Malayan_Problem.txt b/test/txtfiles/TXT/Malayan_Problem.txt
new file mode 100644
index 000000000..4e6616691
--- /dev/null
+++ b/test/txtfiles/TXT/Malayan_Problem.txt
@@ -0,0 +1,5 @@
+\u0D19\u0D4d\u0D19
+\u0D19\u0D4d\u0D19
+ങ്ങ
+ങ്ങ
+ങ്ങ
diff --git a/test/txtfiles/TXT/regex_find.txt b/test/txtfiles/TXT/regex_find.txt
new file mode 100644
index 000000000..a70a351eb
--- /dev/null
+++ b/test/txtfiles/TXT/regex_find.txt
@@ -0,0 +1,24 @@
+# =======================================================
+# Manual Test
+# -----------------------------------------------------------------------------------------------
+# In "Find Text" / "Replace Text" Dialog and RegEx chosen:
+# RegEx: "(\d\d)\s\1" ( w/o the double quotes)
+# => "can't "Find Previous" this string"
+# Remark: but, "Find Next" is working.
+# =======================================================
+
+03 03 04 05 06 07 08 09
+03 03 04 05 06 07 08 09
+03 03 04 05 06 07 08 09
+03 03 04 05 06 07 08 09
+03 03 04 05 06 07 08 09
+03 03 04 05 06 07 08 09
+03 03 04 05 06 07 08 09
+03 03 04 05 06 07 08 09
+03 03 04 05 06 07 08 09
+03 03 04 05 06 07 08 09
+03 03 04 05 06 07 08 09
+03 03 04 05 06 07 08 09
+03 03 04 05 06 07 08 09
+03 03 04 05 06 07 08 09
+03 03 04 05 06 07 08 09
diff --git a/test/txtfiles/strange.txt b/test/txtfiles/TXT/strange_chacter_visual_artefacts.txt
similarity index 100%
rename from test/txtfiles/strange.txt
rename to test/txtfiles/TXT/strange_chacter_visual_artefacts.txt
diff --git a/test/txtfiles/python.py b/test/txtfiles/python.py
new file mode 100644
index 000000000..5adc92bfe
--- /dev/null
+++ b/test/txtfiles/python.py
@@ -0,0 +1,401 @@
+# -*- coding: utf-8 -*-
+# -----------------------------------------------------------------------------
+"""
+Utilities and Helpers for General Tasks
+"""
+import sys
+import os
+import stat
+import getpass
+import shutil
+import tempfile
+import logging
+
+from datetime import datetime
+
+# =============================================================================
+
+WRITE_TO_LOGFILE = False
+DEFAULT_LOG_LEVEL = logging.INFO
+LOG_DIR_CONFIG_FILENAME = "_DBMIG_TMP_DIR_CFG.ini"
+
+# =============================================================================
+
+# TODO: unique keys should not be empty
+_NOT_NULL_EXCEPTION_LIST = [('deductions', 'imrestype_ref'),
+ ('queue lengths', 'imrestype_ref'),
+ ('neighbour networkpoint distances', 'traffic network'),
+ ('occupations', 'day'),
+ ('tb_loc_prop', 'internal_id')]
+ #('flighttypes', 'bgcolor_ref'),
+ #('managedstations', 'routings_ref'),
+ #('routings', 'classification_ref'),
+ #('routings', 'timezone_ref')]
+
+# force FK references to be not null
+_NOT_NULL_FK_REF_LIST = ['managedstations']
+
+# =============================================================================
+
+def eprint(strg):
+ """ print to stderr """
+ print(strg, file=sys.stderr)
+ sys.stderr.flush()
+
+# =============================================================================
+
+def is_ascii(strg):
+ """ is_ascii() """
+ #~return all(ord(c) < 128 for c in strg)
+ try:
+ strg.encode('ascii')
+ except UnicodeEncodeError:
+ return False
+ return True
+
+
+def is_mbcs(strg):
+ """ is_ascii() """
+ try:
+ strg.encode('mbcs')
+ except UnicodeEncodeError:
+ return False
+ return True
+
+# =============================================================================
+
+def check_read_access(input_file):
+ """ check_read_access """
+ if not os.path.isfile(input_file):
+ eprint("Input file ({}) not found!".format(input_file))
+ return False
+
+ if not os.access(input_file, os.R_OK):
+ eprint("Input file ({}) is not readable!".format(input_file))
+ return False
+
+ return True
+
+# =============================================================================
+
+
+def check_write_access(output_path):
+ """ check_write_access """
+ from tempfile import NamedTemporaryFile
+
+ # check if file exists
+ if os.path.isfile(output_path):
+
+ if not os.access(output_path, os.W_OK):
+ eprint("Output file ({}) is not writable!".format(output_path))
+ return False
+ try:
+ os.rename(output_path, output_path) # hack alert
+ except OSError as err:
+ eprint("Error on write access: {}".format(err))
+ return False
+
+ else: # check if directory is writable
+ try:
+ out_dir = os.path.dirname(output_path)
+ with NamedTemporaryFile(dir=out_dir, delete=True) as tmpfile:
+ tmpfile.write(b'blahblub')
+ tmpfile.flush()
+ except OSError as err:
+ eprint("Error on write access: {}".format(err))
+ return False
+
+ return True
+
+# =============================================================================
+
+
+def compose_log_file_path(db_path=None,aprefix="PY"):
+ """ compose_log_file_path() """
+
+ global WRITE_TO_LOGFILE
+ log_file_dir = None
+ log_file_path = None
+
+ try:
+ # assuming this is deterministic
+ cfg_log_path = os.path.join(tempfile.gettempdir(), LOG_DIR_CONFIG_FILENAME)
+ if os.path.isfile(cfg_log_path):
+ with open(cfg_log_path, 'r') as file:
+ log_file_dir = file.readline()
+ except OSError as err:
+ eprint("Error on reading file '{file}' : {err}".format(file=cfg_log_path, err=err))
+ log_file_dir = None
+ except: # pylint: disable=bare-except
+ eprint("Error on composing logfile path!")
+ log_file_dir = None
+ finally:
+ if log_file_dir:
+ WRITE_TO_LOGFILE = True
+ if db_path and not log_file_dir:
+ log_file_dir = os.path.dirname(db_path)
+
+ if not (log_file_dir and os.path.isdir(log_file_dir)):
+ return None
+
+ if not check_write_access(log_file_dir):
+ eprint("No write access to: '{dir}!'".format(dir=log_file_dir))
+ return None
+
+ if db_path:
+ base_name = "_".join([aprefix, os.path.basename(db_path)])
+ else:
+ # no logfile specified, but log_file_dir given: make temp name
+ tmp_path = tempfile.NamedTemporaryFile(prefix=aprefix, suffix="")
+ base_name = os.path.basename(tmp_path.name)
+
+ time_stamp = datetime.now().strftime("%Y-%m-%d_%H%M%S.%f")[:-3]
+ pid_str = "{}".format(os.getpid())
+ log_file_name = ".".join([base_name[:16], getpass.getuser(), pid_str, time_stamp, "log"])
+
+ return os.path.join(log_file_dir, log_file_name)
+
+
+# =============================================================================
+
+MAIN_LOGGER = "thePLPythonMainLogger"
+
+def create_logger(log_file_path=None):
+ """ create_logger() """
+ if WRITE_TO_LOGFILE and log_file_path:
+ have_write_access = check_write_access(log_file_path)
+ else:
+ have_write_access = False
+ # create logger
+ logger = logging.getLogger(MAIN_LOGGER)
+ # create file handler which logs even debug messages
+ if have_write_access:
+ try:
+ if os.path.isfile(log_file_path):
+ os.remove(log_file_path)
+ file_handler = logging.FileHandler(log_file_path, 'w', encoding='UTF-8')
+ file_handler.setLevel(logging.NOTSET)
+ except OSError as err:
+ # don't use eprint() cause this will trigger error meassage in Planning
+ print("Exception: Can not remove old logfile {}!".format(log_file_path))
+ have_write_access = false
+ # create console handler with a higher log level
+ con_stdout_handler = logging.StreamHandler(stream=sys.stdout)
+ con_stdout_handler.setLevel(logging.NOTSET)
+ con_stderr_handler = logging.StreamHandler(stream=sys.stderr)
+ con_stderr_handler.setLevel(logging.ERROR)
+ # create formatter and add it to the handlers
+ #formatter = logging.Formatter("%(asctime)s - %(name)s - %(levelname)s - %(message)s")
+ formatter = logging.Formatter("%(asctime)s - %(levelname)s - %(message)s")
+ if have_write_access:
+ file_handler.setFormatter(formatter)
+ con_stdout_handler.setFormatter(formatter)
+ con_stderr_handler.setFormatter(formatter)
+ # add the handlers to the logger
+ if have_write_access:
+ logger.addHandler(file_handler)
+ logger.addHandler(con_stdout_handler)
+ logger.addHandler(con_stderr_handler)
+ # set default loglevel
+ logger.setLevel(DEFAULT_LOG_LEVEL)
+ return logger
+
+# -----------------------------------------------------------------------------
+
+def get_main_logger():
+ """ get_main_logger() """
+ return logging.getLogger(MAIN_LOGGER)
+
+# -----------------------------------------------------------------------------
+
+def flush_logger():
+ """ flush_logger() """
+ logger = get_main_logger()
+ for handler in logger.handlers:
+ handler.flush()
+
+# =============================================================================
+
+
+def add_read_permission(pathname, who='u'):
+ """Add "read" permission to specified path.
+ """
+ mode = os.stat(pathname).st_mode
+ mode_map = {
+ 'u': stat.S_IRUSR,
+ 'g': stat.S_IRGRP,
+ 'o': stat.S_IROTH,
+ 'a': stat.S_IRUSR | stat.S_IRGRP | stat.S_IROTH,
+ }
+ for w in who:
+ mode |= mode_map[w]
+ os.chmod(pathname, mode)
+
+# -----------------------------------------------------------------------------
+
+def add_write_permission(pathname, who='u'):
+ """Add "write" permission to specified path.
+ """
+ mode = os.stat(pathname).st_mode
+ mode_map = {
+ 'u': stat.S_IWUSR,
+ 'g': stat.S_IWGRP,
+ 'o': stat.S_IWOTH,
+ 'a': stat.S_IWUSR | stat.S_IWGRP | stat.S_IWOTH,
+ }
+ for w in who:
+ mode |= mode_map[w]
+ os.chmod(pathname, mode)
+
+# -----------------------------------------------------------------------------
+
+def add_execute_permission(pathname, who='u'):
+ """Add "write" permission to specified path.
+ """
+ mode = os.stat(pathname).st_mode
+ mode_map = {
+ 'u': stat.S_IXUSR,
+ 'g': stat.S_IXGRP,
+ 'o': stat.S_IXOTH,
+ 'a': stat.S_IXUSR | stat.S_IXGRP | stat.S_IXOTH,
+ }
+ for w in who:
+ mode |= mode_map[w]
+ os.chmod(pathname, mode)
+
+# =============================================================================
+
+
+def get_ordered_unique_list(seq, rev=False):
+ """ get_ordered_unique_list() """
+ return sorted(set(seq), reverse=rev)
+
+# -----------------------------------------------------------------------------
+
+
+def get_missing_elements(sorted_list_of_int, start=None, end=None):
+ """ get_missing_elements()
+ call: list(migutils.get_missing_elements(migutils.get_ordered_unique_list(seq)))
+ """
+ if not start:
+ start = 0
+ if not end:
+ end = len(sorted_list_of_int) - 1
+
+ if (end - start) <= 1:
+ if (sorted_list_of_int[end] - sorted_list_of_int[start]) > 1:
+ yield from range(sorted_list_of_int[start] + 1, sorted_list_of_int[end])
+ return
+
+ index = start + (end - start) // 2
+
+ # is the lower half consecutive?
+ consecutive_low = sorted_list_of_int[index] == (sorted_list_of_int[start] + (index - start))
+ if not consecutive_low:
+ yield from get_missing_elements(sorted_list_of_int, start, index)
+
+ # is the upper part consecutive?
+ consecutive_high = sorted_list_of_int[index] == (sorted_list_of_int[end] - (end - index))
+ if not consecutive_high:
+ yield from get_missing_elements(sorted_list_of_int, index, end)
+
+# -----------------------------------------------------------------------------
+
+def create_temp_filecopy(logger, fpath, fprefix="py_", fsuffix=".tmp"):
+ """ create_temp_filecopy
+ """
+ #~tmp_file_name = db_path + ".tmp_{0}.mdb".format(os.getlogin())
+ tmp_file = tempfile.NamedTemporaryFile(prefix=fprefix, suffix=fsuffix)
+ tmp_file_name = tmp_file.name
+ tmp_file.close() # deletes tmp file
+ logger.info("Creating temporary copy %r.", tmp_file_name)
+ copy_path = shutil.copy2(fpath, tmp_file_name)
+ if not os.path.isfile(copy_path):
+ logger.error("Can not create a temp. copy of '%r'.", fpath)
+ return None
+ add_read_permission(copy_path, 'a')
+ add_write_permission(copy_path, 'a')
+ return copy_path
+
+# -----------------------------------------------------------------------------
+
+# =============================================================================
+
+class CiDict(dict):
+ """ Case-Insensitive dictionary
+ """
+
+ class Key(str):
+ """ Key """
+ def __init__(self, key):
+ """ __init__"""
+ str.__init__(key)
+
+ def __hash__(self):
+ """ __hash__"""
+ return hash(self.lower())
+
+ def __eq__(self, other):
+ """ __eq__"""
+ return self.lower() == other.lower()
+
+ # ------------------------------------------------
+
+ def __init__(self, data=None):
+ """ C'tor of CiDict """
+ super(CiDict, self).__init__()
+ if data is None:
+ data = {}
+ for (key, val) in data.items():
+ self[key] = val
+
+ def __contains__(self, key):
+ """ __contains__ """
+ key = self.Key(key)
+ return super(CiDict, self).__contains__(key)
+
+ def __delitem__(self, key):
+ """ __delitem__ """
+ key = self.Key(key)
+ return super(CiDict, self).__delitem__(key)
+
+ def __setitem__(self, key, value):
+ """ __setitem__ """
+ key = self.Key(key)
+ super(CiDict, self).__setitem__(key, value)
+
+ def __getitem__(self, key):
+ """ __getitem__ """
+ key = self.Key(key)
+ return super(CiDict, self).__getitem__(key)
+
+# =========================================================================
+
+
+def indent_xml(elem, level=0, last=False):
+ """ indent_xml(): text tail """
+ _tab = "\t"
+ _tail = "\n" + (level * _tab)
+ _text = _tail + _tab
+
+ if elem:
+ if not elem.text or not elem.text.strip(): elem.text = _text
+
+ # recursion
+ for el in elem[:-1]: indent_xml(el, level+1)
+
+ # last item
+ if level:
+ for el in elem[-1:]: indent_xml(el, level, True)
+ else:
+ for el in elem[-1:]: indent_xml(el, 1, True)
+
+ if not elem.tail or not elem.tail.strip(): elem.tail = "\n" if last else _tail
+
+ else:
+ if not elem.tail or not elem.tail.strip(): elem.tail = _tail
+
+# =============================================================================
+
+
+# =============================================================================
diff --git a/test/txtfiles/regex_find.txt b/test/txtfiles/regex_find.txt
deleted file mode 100644
index 4ab58ab40..000000000
--- a/test/txtfiles/regex_find.txt
+++ /dev/null
@@ -1,26 +0,0 @@
-In "Find Text" dialog (or "Replace Text" and Regular expression search box ticked),
-I can't "Find Previous" this string
-
-(\d\d)\s\1
-
-on this text (for example):
-
-03 03 04 05 06 07 08 09
-03 03 04 05 06 07 08 09
-03 03 04 05 06 07 08 09
-03 03 04 05 06 07 08 09
-03 03 04 05 06 07 08 09
-03 03 04 05 06 07 08 09
-03 03 04 05 06 07 08 09
-03 03 04 05 06 07 08 09
-03 03 04 05 06 07 08 09
-03 03 04 05 06 07 08 09
-03 03 04 05 06 07 08 09
-03 03 04 05 06 07 08 09
-03 03 04 05 06 07 08 09
-03 03 04 05 06 07 08 09
-03 03 04 05 06 07 08 09
-
-but, "Find Next" is working.
-
-In Notepad2 and Notepad2BE works fine.
\ No newline at end of file