Character Substitute plugin
Posted: March 7th, 2018, 10:09 pm
Before anybody flames me for this to tell me Limbo has a very similar plugin, we couldn't find it and this was written to resolve a very particular problem.
Subst.dll
This plugin is to allow single characters to be substituted with another character. Up to 256 substitutions can be done and these are defined in a configuration file in the plugins folder called Subst.cfg. It has been used to allow the correct display of some Spanish characters. The cfg file looks like:
//
Debug=1
//
//$Chr(225) Instead of this weird symbol it should display á $Chr(157)
//$Chr(233) Instead of this weird symbol it should display é $Chr(150)
//$Chr(237) Instead of this weird symbol it should display í $Chr(163)
//$Chr(243) Instead of this weird symbol it should display ó $Chr(137)
//$Chr(250) Instead of this weird symbol it should display ú $Chr(130)
//$Chr(241) Instead of this weird symbol it should display ñ $Chr(167)
//
In=$E1
Out=$9D
In=$E9
Out=$96
In=$ED
Out=$A3
In=$F3
Out=$89
In=$FA
Out=$82
In=$F1
Out=$A7
In=$D1
Out=$A6
Debug=1 will create a log file in the Logs subdirectory called Subst.log so you can verify that the cfg file has been read correctly.
The substitutions are in pairs of In and Out hex values.
The file needs a blank line at the end or the last value won’t work. The dll is called by:
$dll(Subst,1,text_to_convert,)
e.g: $dll(Subst,1,($Rss(http://www.telam.com.ar/rss2/ultimasnoticias.xml,b,1,)),)
Subst.dll
This plugin is to allow single characters to be substituted with another character. Up to 256 substitutions can be done and these are defined in a configuration file in the plugins folder called Subst.cfg. It has been used to allow the correct display of some Spanish characters. The cfg file looks like:
//
Debug=1
//
//$Chr(225) Instead of this weird symbol it should display á $Chr(157)
//$Chr(233) Instead of this weird symbol it should display é $Chr(150)
//$Chr(237) Instead of this weird symbol it should display í $Chr(163)
//$Chr(243) Instead of this weird symbol it should display ó $Chr(137)
//$Chr(250) Instead of this weird symbol it should display ú $Chr(130)
//$Chr(241) Instead of this weird symbol it should display ñ $Chr(167)
//
In=$E1
Out=$9D
In=$E9
Out=$96
In=$ED
Out=$A3
In=$F3
Out=$89
In=$FA
Out=$82
In=$F1
Out=$A7
In=$D1
Out=$A6
Debug=1 will create a log file in the Logs subdirectory called Subst.log so you can verify that the cfg file has been read correctly.
The substitutions are in pairs of In and Out hex values.
The file needs a blank line at the end or the last value won’t work. The dll is called by:
$dll(Subst,1,text_to_convert,)
e.g: $dll(Subst,1,($Rss(http://www.telam.com.ar/rss2/ultimasnoticias.xml,b,1,)),)