Hi,
a have a plugin that creates a SelectionRange und search in the content of the editor for the Specialchars "$$".
If i debug my code (with VS 2009, and IE 6) the String with the Specialchar is not "$$", it has changed to "??".
Why is that happend???
Here my Code (PSPad)
function ToNextJumpLabel(bForward) { var selection = document.selection.createRange(); // Vorwärts oder Rückwärts? if (bForward) { debugger; // Sprungmarke markiert? ja -> ein Zeichen vorruecken if (selection.text == '§§') { selection.move("character",1); } selection.findText('§§', 1); } else { // Sprungmarke markiert? ja -> ein Zeichen zurueckruecken if (selection.text == "§§") { selection.move("character", -1); } selection.findText("§§", -1); } // Neue Sprungmarke markieren selection.select(); }
and this is the Code in the DebugMode (VS 2008)
function ToNextJumpLabel(bForward) { var selection = document.selection.createRange(); // Vorw䲴s oder R?ts? if (bForward) { debugger; // Sprungmarke markiert? ja -> ein Zeichen vorruecken if (selection.text == '??') { selection.move("character",1); } selection.findText('??', 1); } else { // Sprungmarke markiert? ja -> ein Zeichen zurueckruecken if (selection.text == "??") { selection.move("character", -1); } selection.findText("??", -1); } // Neue Sprungmarke markieren selection.select(); }
The searchstring of the findText function is not correct and so the function will not found a "jumpLabel"
How can this be? Other specialchars (like ü,ö,ä) in the code will changed, too.
Any idears?
Taki