Change XML encoding from Windows-1252 to UTF-8 (config.xml and others)

and add XML declaration for session.xml, shortcuts.xml & userDefineLang.xml for conforming to XML standard specs.

Regarding the suggestions from #9339
pull/9369/head
Don HO 2021-01-04 15:02:09 +01:00
parent e24ad94ddd
commit 52e8c68f90
No known key found for this signature in database
GPG Key ID: 6C429F1D8D84F46E
55 changed files with 128 additions and 64 deletions

View File

@ -0,0 +1,65 @@
<?xml version="1.0" encoding="UTF-8" ?>
<NotepadPlus>
<UserLang name="ggg" ext="" udlVersion="2.1">
<Settings>
<Global caseIgnored="no" allowFoldOfComments="no" foldCompact="no" forcePureLC="0" decimalSeparator="0" />
<Prefix Keywords1="no" Keywords2="no" Keywords3="no" Keywords4="no" Keywords5="no" Keywords6="no" Keywords7="no" Keywords8="no" />
</Settings>
<KeywordLists>
<Keywords name="Comments"></Keywords>
<Keywords name="Numbers, prefix1"></Keywords>
<Keywords name="Numbers, prefix2"></Keywords>
<Keywords name="Numbers, extras1"></Keywords>
<Keywords name="Numbers, extras2"></Keywords>
<Keywords name="Numbers, suffix1"></Keywords>
<Keywords name="Numbers, suffix2"></Keywords>
<Keywords name="Numbers, range"></Keywords>
<Keywords name="Operators1"></Keywords>
<Keywords name="Operators2"></Keywords>
<Keywords name="Folders in code1, open"></Keywords>
<Keywords name="Folders in code1, middle"></Keywords>
<Keywords name="Folders in code1, close"></Keywords>
<Keywords name="Folders in code2, open"></Keywords>
<Keywords name="Folders in code2, middle"></Keywords>
<Keywords name="Folders in code2, close"></Keywords>
<Keywords name="Folders in comment, open"></Keywords>
<Keywords name="Folders in comment, middle"></Keywords>
<Keywords name="Folders in comment, close"></Keywords>
<Keywords name="Keywords1"></Keywords>
<Keywords name="Keywords2"></Keywords>
<Keywords name="Keywords3"></Keywords>
<Keywords name="Keywords4"></Keywords>
<Keywords name="Keywords5"></Keywords>
<Keywords name="Keywords6"></Keywords>
<Keywords name="Keywords7"></Keywords>
<Keywords name="Keywords8"></Keywords>
<Keywords name="Delimiters"></Keywords>
</KeywordLists>
<Styles>
<WordsStyle name="DEFAULT" fgColor="000000" bgColor="FFFFFF" fontName="" fontStyle="0" nesting="0" />
<WordsStyle name="COMMENTS" fgColor="000000" bgColor="FFFFFF" fontName="" fontStyle="0" nesting="0" />
<WordsStyle name="LINE COMMENTS" fgColor="000000" bgColor="FFFFFF" fontName="" fontStyle="0" nesting="0" />
<WordsStyle name="NUMBERS" fgColor="000000" bgColor="FFFFFF" fontName="" fontStyle="0" nesting="0" />
<WordsStyle name="KEYWORDS1" fgColor="000000" bgColor="FFFFFF" fontName="" fontStyle="0" nesting="0" />
<WordsStyle name="KEYWORDS2" fgColor="000000" bgColor="FFFFFF" fontName="" fontStyle="0" nesting="0" />
<WordsStyle name="KEYWORDS3" fgColor="000000" bgColor="FFFFFF" fontName="" fontStyle="0" nesting="0" />
<WordsStyle name="KEYWORDS4" fgColor="000000" bgColor="FFFFFF" fontName="" fontStyle="0" nesting="0" />
<WordsStyle name="KEYWORDS5" fgColor="000000" bgColor="FFFFFF" fontName="" fontStyle="0" nesting="0" />
<WordsStyle name="KEYWORDS6" fgColor="000000" bgColor="FFFFFF" fontName="" fontStyle="0" nesting="0" />
<WordsStyle name="KEYWORDS7" fgColor="000000" bgColor="FFFFFF" fontName="" fontStyle="0" nesting="0" />
<WordsStyle name="KEYWORDS8" fgColor="000000" bgColor="FFFFFF" fontName="" fontStyle="0" nesting="0" />
<WordsStyle name="OPERATORS" fgColor="000000" bgColor="FFFFFF" fontName="" fontStyle="0" nesting="0" />
<WordsStyle name="FOLDER IN CODE1" fgColor="000000" bgColor="FFFFFF" fontName="" fontStyle="0" nesting="0" />
<WordsStyle name="FOLDER IN CODE2" fgColor="000000" bgColor="FFFFFF" fontName="" fontStyle="0" nesting="0" />
<WordsStyle name="FOLDER IN COMMENT" fgColor="000000" bgColor="FFFFFF" fontName="" fontStyle="0" nesting="0" />
<WordsStyle name="DELIMITERS1" fgColor="000000" bgColor="FFFFFF" fontName="" fontStyle="0" nesting="0" />
<WordsStyle name="DELIMITERS2" fgColor="000000" bgColor="FFFFFF" fontName="" fontStyle="0" nesting="0" />
<WordsStyle name="DELIMITERS3" fgColor="000000" bgColor="FFFFFF" fontName="" fontStyle="0" nesting="0" />
<WordsStyle name="DELIMITERS4" fgColor="000000" bgColor="FFFFFF" fontName="" fontStyle="0" nesting="0" />
<WordsStyle name="DELIMITERS5" fgColor="000000" bgColor="FFFFFF" fontName="" fontStyle="0" nesting="0" />
<WordsStyle name="DELIMITERS6" fgColor="000000" bgColor="FFFFFF" fontName="" fontStyle="0" nesting="0" />
<WordsStyle name="DELIMITERS7" fgColor="000000" bgColor="FFFFFF" fontName="" fontStyle="0" nesting="0" />
<WordsStyle name="DELIMITERS8" fgColor="000000" bgColor="FFFFFF" fontName="" fontStyle="0" nesting="0" />
</Styles>
</UserLang>
</NotepadPlus>

View File

@ -1,4 +1,4 @@
<?xml version="1.0" encoding="Windows-1252" ?>
<?xml version="1.0" encoding="UTF-8" ?>
<NotepadPlus>
<AutoComplete language="BaanC">
<Environment ignoreCase="yes" startFunc="(" stopFunc=")" paramSeparator="," additionalWordChar=".:$#" />

View File

@ -1,4 +1,4 @@
<?xml version="1.0" encoding="Windows-1252" ?>
<?xml version="1.0" encoding="UTF-8" ?>
<NotepadPlus>
<AutoComplete>
<KeyWord name="&quot;allowscale&quot;" />

View File

@ -1,4 +1,4 @@
<?xml version="1.0" encoding="Windows-1252" ?>
<?xml version="1.0" encoding="UTF-8" ?>
<NotepadPlus>
<AutoComplete>
<Environment ignoreCase="yes" startFunc="(" stopFunc=")" paramSeparator="," terminal=";" additionalWordChar="@"/>

View File

@ -1,4 +1,4 @@
<?xml version="1.0" encoding="Windows-1252" ?>
<?xml version="1.0" encoding="UTF-8" ?>
<NotepadPlus>
<AutoComplete>
<KeyWord name="arp" />

View File

@ -1,4 +1,4 @@
<?xml version="1.0" encoding="Windows-1252" ?>
<?xml version="1.0" encoding="UTF-8" ?>
<NotepadPlus>
<AutoComplete language="C">
<Environment ignoreCase="no" startFunc="(" stopFunc=")" paramSeparator="," terminal=";" />

View File

@ -1,4 +1,4 @@
<?xml version="1.0" encoding="Windows-1252" ?>
<?xml version="1.0" encoding="UTF-8" ?>
<NotepadPlus>
<AutoComplete>
<Environment ignoreCase="no" startFunc="(" stopFunc=")" paramSeparator="," terminal=";" />

View File

@ -1,4 +1,4 @@
<?xml version="1.0" encoding="Windows-1252" ?>
<?xml version="1.0" encoding="UTF-8" ?>
<NotepadPlus>
<Environment ignoreCase="yes" startFunc="(" stopFunc=")" paramSeparator="," additionalWordChar="-" />
<!-- note: this list was created using functions and reserved words known to GnuCOBOL (COBOL85,2002,2014 + extensions from IBM/MF/RM/ACUCOBOL) -->

View File

@ -1,4 +1,4 @@
<?xml version="1.0" encoding="Windows-1252" ?>
<?xml version="1.0" encoding="UTF-8" ?>
<NotepadPlus>
<AutoComplete>
<KeyWord name="arguments" />

View File

@ -1,4 +1,4 @@
<?xml version="1.0" encoding="Windows-1252" ?>
<?xml version="1.0" encoding="UTF-8" ?>
<NotepadPlus>
<!-- language doesnt really mean anything, its more of a comment -->
<AutoComplete language="C++">

View File

@ -1,4 +1,4 @@
<?xml version="1.0" encoding="Windows-1252" ?>
<?xml version="1.0" encoding="UTF-8" ?>
<NotepadPlus>
<AutoComplete language="C#">
<Environment ignoreCase="no" startFunc="(" stopFunc=")" paramSeparator="," terminal=";" additionalWordChar="."/>

View File

@ -1,4 +1,4 @@
<?xml version="1.0" encoding="Windows-1252" ?>
<?xml version="1.0" encoding="UTF-8" ?>
<NotepadPlus>
<AutoComplete>
<KeyWord name=":active" />

View File

@ -1,4 +1,4 @@
<?xml version="1.0" encoding="Windows-1252" ?>
<?xml version="1.0" encoding="UTF-8" ?>
<NotepadPlus>
<AutoComplete>
<KeyWord name="!DOCTYPE html" />

View File

@ -1,4 +1,4 @@
<?xml version="1.0" encoding="Windows-1252" ?>
<?xml version="1.0" encoding="UTF-8" ?>
<NotepadPlus>
<AutoComplete>
<Environment ignoreCase="no" startFunc="(" stopFunc=")" paramSeparator="," terminal=";" />

View File

@ -1,4 +1,4 @@
<?xml version="1.0" encoding="Windows-1252" ?>
<?xml version="1.0" encoding="UTF-8" ?>
<NotepadPlus>
<AutoComplete>
<KeyWord name="above" />

View File

@ -1,4 +1,4 @@
<?xml version="1.0" encoding="Windows-1252" ?>
<?xml version="1.0" encoding="UTF-8" ?>
<NotepadPlus>
<AutoComplete>
<KeyWord name="*error*" />

View File

@ -1,4 +1,4 @@
<?xml version="1.0" encoding="Windows-1252" ?>
<?xml version="1.0" encoding="UTF-8" ?>
<NotepadPlus>
<Environment ignoreCase="yes" startFunc="(" stopFunc=")" paramSeparator="," terminal=";" additionalWordChar=".:" />
<AutoComplete language="LUA">

View File

@ -1,4 +1,4 @@
<?xml version="1.0" encoding="Windows-1252" ?>
<?xml version="1.0" encoding="UTF-8" ?>
<NotepadPlus>
<AutoComplete>
<KeyWord name="!AddIncludeDir" />

View File

@ -1,4 +1,4 @@
<?xml version="1.0" encoding="Windows-1252" ?>
<?xml version="1.0" encoding="UTF-8" ?>
<NotepadPlus>
<AutoComplete>
<Environment ignoreCase="no" startFunc="(" stopFunc=")" paramSeparator="," terminal=";" />

View File

@ -1,4 +1,4 @@
<?xml version="1.0" encoding="Windows-1252" ?>
<?xml version="1.0" encoding="UTF-8" ?>
<!--
@author Geoffray Warnants - http://www.geoffray.be
@version 1.35.20100625

View File

@ -1,4 +1,4 @@
<?xml version="1.0" encoding="Windows-1252" ?>
<?xml version="1.0" encoding="UTF-8" ?>
<!--
@author Gregori Gerebtzoff
@version 1.2

View File

@ -1,4 +1,4 @@
<?xml version="1.0" encoding="Windows-1252" ?>
<?xml version="1.0" encoding="UTF-8" ?>
<NotepadPlus>
<AutoComplete>
<KeyWord name="ACCELERATORS" />

View File

@ -1,4 +1,4 @@
<?xml version="1.0" encoding="Windows-1252" ?>
<?xml version="1.0" encoding="UTF-8" ?>
<NotepadPlus>
<AutoComplete language="SQL">
<Environment ignoreCase="yes" startFunc="(" stopFunc=")" paramSeparator="," terminal=";" />

View File

@ -1,4 +1,4 @@
<?xml version="1.0" encoding="Windows-1252" ?>
<?xml version="1.0" encoding="UTF-8" ?>
<NotepadPlus>
<AutoComplete>
<Environment ignoreCase="no" />

View File

@ -1,4 +1,4 @@
<?xml version="1.0" encoding="Windows-1252" ?>
<?xml version="1.0" encoding="UTF-8" ?>
<NotepadPlus>
<AutoComplete>
<KeyWord name="Abs" />

View File

@ -1,4 +1,4 @@
<?xml version="1.0" encoding="Windows-1252" ?>
<?xml version="1.0" encoding="UTF-8" ?>
<NotepadPlus>
<AutoComplete>
<KeyWord name="abs" />

View File

@ -1,4 +1,4 @@
<?xml version="1.0" encoding="Windows-1252" ?>
<?xml version="1.0" encoding="UTF-8" ?>
<NotepadPlus>
<AutoComplete>
<KeyWord name="abbrev" />

View File

@ -1,4 +1,4 @@
<?xml version="1.0" encoding="Windows-1252" ?>
<?xml version="1.0" encoding="UTF-8" ?>
<!--//
Bespin

View File

@ -1,4 +1,4 @@
<?xml version="1.0" encoding="Windows-1252" ?>
<?xml version="1.0" encoding="UTF-8" ?>
<!--//
Blackboard

View File

@ -1,4 +1,4 @@
<?xml version="1.0" encoding="Windows-1252" ?>
<?xml version="1.0" encoding="UTF-8" ?>
<!--//
choco

View File

@ -1,4 +1,4 @@
<?xml version="1.0" encoding="Windows-1252" ?>
<?xml version="1.0" encoding="UTF-8" ?>
<!--// DansLeRuSH's dark theme for Notepad++ / Notepad plus plus
[ LEGAL DISCLAIMER ] Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"),

View File

@ -1,4 +1,4 @@
<?xml version="1.0" encoding="Windows-1252" ?>
<?xml version="1.0" encoding="UTF-8" ?>
<!--
Style Name: Deep Black
Description: Based on the theme Port VibrantInk by tyler

View File

@ -1,4 +1,4 @@
<?xml version="1.0" encoding="Windows-1252" ?>
<?xml version="1.0" encoding="UTF-8" ?>
<!--
Theme name : Hello Kitty
This theme is not complete. If you enhance it, please send it back to me :

View File

@ -1,4 +1,4 @@
<?xml version="1.0" encoding="Windows-1252" ?>
<?xml version="1.0" encoding="UTF-8" ?>
<!--//
File Name: HotFudgeSundae.xml
Style Name: HotFudgeSundae

View File

@ -1,4 +1,4 @@
<?xml version="1.0" encoding="Windows-1252" ?>
<?xml version="1.0" encoding="UTF-8" ?>
<!--//
monoindustrial

View File

@ -1,4 +1,4 @@
<?xml version="1.0" encoding="Windows-1252" ?>
<?xml version="1.0" encoding="UTF-8" ?>
<!--//
Monokai

View File

@ -1,4 +1,4 @@
<?xml version="1.0" encoding="Windows-1252" ?>
<?xml version="1.0" encoding="UTF-8" ?>
<!--//
File Name: MossyLawn.xml
Style Name: MossyLawn

View File

@ -1,4 +1,4 @@
<?xml version="1.0" encoding="Windows-1252" ?>
<?xml version="1.0" encoding="UTF-8" ?>
<!--//
File Name: Navajo.xml
Style Name: Navajo

View File

@ -1,4 +1,4 @@
<?xml version="1.0" encoding="Windows-1252" ?>
<?xml version="1.0" encoding="UTF-8" ?>
<!--
Notepad++ Custom Style

View File

@ -1,4 +1,4 @@
<?xml version="1.0" encoding="Windows-1252" ?>
<?xml version="1.0" encoding="UTF-8" ?>
<!--//
PlasticCodeWrap

View File

@ -1,4 +1,4 @@
<?xml version="1.0" encoding="Windows-1252" ?>
<?xml version="1.0" encoding="UTF-8" ?>
<!--
Notepad++ Custom stylers
Style name: Port Ruby Blue

View File

@ -1,4 +1,4 @@
<?xml version="1.0" encoding="Windows-1252" ?>
<?xml version="1.0" encoding="UTF-8" ?>
<!--//
File Name: Solarized-light.xml
Style Name: Solarized-light

View File

@ -1,4 +1,4 @@
<?xml version="1.0" encoding="Windows-1252" ?>
<?xml version="1.0" encoding="UTF-8" ?>
<!--//
File Name: Solarized.xml
Style Name: Solarized

View File

@ -1,4 +1,4 @@
<?xml version="1.0" encoding="Windows-1252" ?>
<?xml version="1.0" encoding="UTF-8" ?>
<!--//
Twilight

View File

@ -1,4 +1,4 @@
<?xml version="1.0" encoding="Windows-1252" ?>
<?xml version="1.0" encoding="UTF-8" ?>
<!--
Style Name: Port VibrantInk
Description: Based on the Textmate theme VibrantInk (http://alternateidea.com/blog/articles/2006/01/03/textmate-vibrant-ink-theme-and-prototype-bundle) by Justin Palmer

View File

@ -1,4 +1,4 @@
<?xml version="1.0" encoding="Windows-1252" ?>
<?xml version="1.0" encoding="UTF-8" ?>
<!--
File name: Zenburn.xml
Style Name: Zenburn

View File

@ -1,4 +1,4 @@
<?xml version="1.0" encoding="Windows-1252" ?>
<?xml version="1.0" encoding="UTF-8" ?>
<!--//
File Name: khaki.xml
Style Name: khaki

View File

@ -1,4 +1,4 @@
<?xml version="1.0" encoding="Windows-1252" ?>
<?xml version="1.0" encoding="UTF-8" ?>
<NotepadPlus>
<LexerStyles>
<LexerType name="actionscript" desc="ActionScript" ext="">

View File

@ -1215,7 +1215,7 @@ bool NppParameters::load()
if (!loadOkay)
{
TiXmlDeclaration* decl = new TiXmlDeclaration(TEXT("1.0"), TEXT("Windows-1252"), TEXT(""));
TiXmlDeclaration* decl = new TiXmlDeclaration(TEXT("1.0"), TEXT("UTF-8"), TEXT(""));
_pXmlUserDoc->LinkEndChild(decl);
}
else
@ -2746,6 +2746,7 @@ std::pair<unsigned char, unsigned char> NppParameters::feedUserLang(TiXmlNode *n
bool NppParameters::importUDLFromFile(const generic_string& sourceFile)
{
TiXmlDocument *pXmlUserLangDoc = new TiXmlDocument(sourceFile);
bool loadOkay = pXmlUserLangDoc->LoadFile();
if (loadOkay)
{
@ -2960,6 +2961,8 @@ void NppParameters::writeDefaultUDL()
if (!_pXmlUserLangDoc)
{
_pXmlUserLangDoc = new TiXmlDocument(_userDefineLangPath);
TiXmlDeclaration* decl = new TiXmlDeclaration(TEXT("1.0"), TEXT("UTF-8"), TEXT(""));
_pXmlUserLangDoc->LinkEndChild(decl);
_pXmlUserLangDoc->InsertEndChild(TiXmlElement(TEXT("NotepadPlus")));
}
@ -3152,6 +3155,10 @@ void NppParameters::writeSession(const Session & session, const TCHAR *fileName)
const TCHAR *pathName = fileName?fileName:_sessionPath.c_str();
_pXmlSessionDoc = new TiXmlDocument(pathName);
TiXmlDeclaration* decl = new TiXmlDeclaration(TEXT("1.0"), TEXT("UTF-8"), TEXT(""));
_pXmlSessionDoc->LinkEndChild(decl);
TiXmlNode *root = _pXmlSessionDoc->InsertEndChild(TiXmlElement(TEXT("NotepadPlus")));
if (root)
@ -3238,6 +3245,8 @@ void NppParameters::writeShortcuts()
{
//do the treatment
_pXmlShortcutDoc = new TiXmlDocument(_shortcutsPath);
TiXmlDeclaration* decl = new TiXmlDeclaration(TEXT("1.0"), TEXT("UTF-8"), TEXT(""));
_pXmlShortcutDoc->LinkEndChild(decl);
}
TiXmlNode *root = _pXmlShortcutDoc->FirstChild(TEXT("NotepadPlus"));

View File

@ -1,4 +1,4 @@
<?xml version="1.0" encoding="Windows-1252" ?>
<?xml version="1.0" encoding="UTF-8" ?>
<NotepadPlus>
<GUIConfigs>
<GUIConfig name="ToolBar" visible="yes">standard</GUIConfig>

View File

@ -1,4 +1,4 @@
<?xml version="1.0" encoding="Windows-1252" ?>
<?xml version="1.0" encoding="UTF-8" ?>
<NotepadPlus>
<!-- The key words of the supported languages, don't touch them! -->
<Languages>

View File

@ -1,3 +1,4 @@
<?xml version="1.0" encoding="UTF-8" ?>
<NotepadPlus>
<InternalCommands />
<Macros>
@ -7,17 +8,6 @@
</Macro>
</Macros>
<UserDefinedCommands>
<!--
The following shortcuts are dangerous if your computer is compromised.
(But if your computer is compromised, EVERYTHING IS DANGEROUS!)
Remove the comment and use them at your own risk!!!
<Command name="Launch in Firefox" Ctrl="yes" Alt="yes" Shift="yes" Key="88">firefox &quot;$(FULL_CURRENT_PATH)&quot;</Command>
<Command name="Launch in IE" Ctrl="yes" Alt="yes" Shift="yes" Key="73">iexplore &quot;$(FULL_CURRENT_PATH)&quot;</Command>
<Command name="Launch in Chrome" Ctrl="yes" Alt="yes" Shift="yes" Key="82">chrome &quot;$(FULL_CURRENT_PATH)&quot;</Command>
<Command name="Launch in Safari" Ctrl="yes" Alt="yes" Shift="yes" Key="65">safari &quot;$(FULL_CURRENT_PATH)&quot;</Command>
<Command name="Send via Outlook" Ctrl="yes" Alt="yes" Shift="yes" Key="79">outlook /a &quot;$(FULL_CURRENT_PATH)&quot;</Command>
-->
<Command name="Get PHP help" Ctrl="no" Alt="yes" Shift="no" Key="112">https://www.php.net/$(CURRENT_WORD)</Command>
<Command name="Wikipedia Search" Ctrl="no" Alt="yes" Shift="no" Key="114">https://en.wikipedia.org/wiki/Special:Search?search=$(CURRENT_WORD)</Command>
<Command name="Open file in another instance" Ctrl="no" Alt="yes" Shift="no" Key="117">$(NPP_FULL_FILE_PATH) $(CURRENT_WORD) -nosession -multiInst</Command>

View File

@ -1,4 +1,4 @@
<?xml version="1.0" encoding="Windows-1252" ?>
<?xml version="1.0" encoding="UTF-8" ?>
<NotepadPlus>
<LexerStyles>
<LexerType name="actionscript" desc="ActionScript" ext="">

View File

@ -1,4 +1,4 @@
<?xml version="1.0" encoding="Windows-1252" ?>
<?xml version="1.0" encoding="UTF-8" ?>
<NotepadPlus>
<ToolBarIcons>
<Theme name = "virgin" pathPrefix = "">

View File

@ -1,4 +1,4 @@
<?xml version="1.0" encoding="Windows-1252" ?>
<?xml version="1.0" encoding="UTF-8" ?>
<NotepadPlus>
<UserLang name="RC File" ext="rc">
<Settings>