Subj : Re: How to put a null character into a string? To : netscape.public.mozilla.jseng From : Bob Clary Date : Wed Jun 08 2005 09:14 pm Christian Biesinger wrote: > Hi, > I was playing around a bit with JS strings. I got unexpected results: > js> "\u0000".charCodeAt(0) > typein:1: ReferenceError: \xC30 is not defined > js> "\u0000" > u0\uffff000 > js> "\x00".charCodeAt(0) > typein:3: ReferenceError: \xC30 is not defined > js> String.fromCharCode(0) > typein:4: ReferenceError: \xC30 is not defined > > Why \xC30? Is that expected behaviour? > > That was with an xpcshell from today's cvs trunk. > > It works for me in a js shell from a trunk cvs pull around 3AM ET. Unfortunately, my xpcshell won't start. :-/ .