Sometimes user will copy in a string from a web sites.
It can contain a Zero Width Space character that will not be seen and will make your life a mess.
Pasting the string into Notepad++
<PLCsymbol SignalName=".bNewAMTG_Clutch_Cal" Value="true" />
and enable show all characters you will see
<PLCsymbol SignalName="ZWSP.bNewAMTG_Clutch_Cal" Value="true" />
The ZWSP character is UniCode Char &H200B
so
Dim CleanStr as string
CleanStr=messyStr.Replace(ChrW(&H200B), "")
This will remove any ZWSP's
No comments:
Post a Comment