There is a GTK+ Javascript ( Seed ) Database Tutorial here: Javascript GTK+ Seed SqLite Tutorial
When I cut and paste the code into Geany or Gedit and pile it throws this error:
** (seed:19814): CRITICAL **: Line 3 in ./db.js: SyntaxError Invalid character '\u8220'
After unsuccessfully trying to locate and delete the offending character not once but countless times I gave up. Then I simply typed all the code into Geany and then it piles and executes no errors .
My question is do we have a way for Geany or Gedit to actually display or even place mark such invisible characters as typing in small programs I have no issues with but as they bee larger then it bees exceedingly weary and inefficient, especially when one is trying to learn a new framework.
My apologies if this is not a proper question for Stackoverflow but I truly am trying to understand how the cutting and pasting process adds in these characters, I have looked through the html and I see no such character in the tutorial.
The whole point of having sample code is to allow the end-user to cut and paste and pile and learn ? But this gave me a real bad headache till I finally decided to type it all in and then everything works.
There is a GTK+ Javascript ( Seed ) Database Tutorial here: Javascript GTK+ Seed SqLite Tutorial
When I cut and paste the code into Geany or Gedit and pile it throws this error:
** (seed:19814): CRITICAL **: Line 3 in ./db.js: SyntaxError Invalid character '\u8220'
After unsuccessfully trying to locate and delete the offending character not once but countless times I gave up. Then I simply typed all the code into Geany and then it piles and executes no errors .
My question is do we have a way for Geany or Gedit to actually display or even place mark such invisible characters as typing in small programs I have no issues with but as they bee larger then it bees exceedingly weary and inefficient, especially when one is trying to learn a new framework.
My apologies if this is not a proper question for Stackoverflow but I truly am trying to understand how the cutting and pasting process adds in these characters, I have looked through the html and I see no such character in the tutorial.
The whole point of having sample code is to allow the end-user to cut and paste and pile and learn ? But this gave me a real bad headache till I finally decided to type it all in and then everything works.
Share Improve this question edited Jul 3, 2013 at 15:48 Aruna Hewapathirane asked Jul 3, 2013 at 15:27 Aruna HewapathiraneAruna Hewapathirane 951 gold badge2 silver badges13 bronze badges 4-
You can always use
od
to dump out a file and look for funny characters. – Pointy Commented Jul 3, 2013 at 15:31 - Thank you Pointy that is a nifty tool I had no idea of but how does one edit and correct the offending character(s) as once loaded into Geany or Gedit both do not display them. – Aruna Hewapathirane Commented Jul 3, 2013 at 15:54
-
1
Well it depends on the editor. In this case, that character looks like this: “ It looks like ordinary double-quotes if you're not paying close attention. In
gvim
you can search like this:/[^ -~]/
– Pointy Commented Jul 3, 2013 at 16:18 - Your right and (ahem..) another valid reason to familiarize myself with gvim I guess :-) Thank you for the guidance much appreciated :-) – Aruna Hewapathirane Commented Jul 3, 2013 at 16:32
1 Answer
Reset to default 4Your editors are displaying the offending character, you're just not recognizing it. The code point in the error message refers to the left double quotation mark character, which is indeed present in some examples on the linked page. This is almost certainly an unintentional effect of some well-meaning text editing software. As you correctly point out, code examples are intended to be copied and pasted, and you should report a bug to the site admins.
To add to the confusion, the error message printed by Seed's JavaScript parser is wrong: it misrepresents the \u201c
character (which has decimal code 8220) as \u8220
. This is why attempts to search for \u8220
fail.
To fix the problem in your file, you need to replace the character with an upright quotation mark. To search for an arbitrary Unicode character in a GTK-based text editor, press ctrl-f to initiate search and input the character by with ctrl-shift-u followed by the code point, in this case 201c
. You will need to do the same for the right quotation mark, whose hex code is 201d
.