By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,716 Members | 1,304 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,716 IT Pros & Developers. It's quick & easy.

Insert ASCII charaters

P: n/a
I need to replace an existing delimiter in a text string with ASCII #29.

(a) Is this possible?
(b) Any traps to beware of, handling strings with 'odd' chars embedded
in them?.

The #29-delimited string will be created in a web form and submitted to
an ASP page which will write the data to a TXT file for merge into a
flat file database (at the end of the process).

I could do the delimiter change server side in ASP as I don't see any
native JS ASCII character handling methods but I'd like to do the
process at source during validation, if I can.

Regards

Mark
Jul 23 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
Mark Anderson wrote on 28 aug 2004 in comp.lang.javascript:
I need to replace an existing delimiter in a text string with ASCII
#29.

(a) Is this possible?
(b) Any traps to beware of, handling strings with 'odd' chars embedded
in them?.
t = t.replace(/#/g,'\x1D')

# is the example delimiter
1D is hexadecimal for 29
The #29-delimited string will be created in a web form and submitted
to an ASP page which will write the data to a TXT file for merge into
a flat file database (at the end of the process).

I could do the delimiter change server side in ASP as I don't see any
native JS ASCII character handling methods but I'd like to do the
process at source during validation, if I can.


It does not matter if you do the above javascript clientside or
serverside under ASP/javascript or thanslated to ASP/vbscript.

In general, all that can be done serverside, out of the hands of hackers
and experimenting juveniles, should be done there.
--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress,
but let us keep the discussions in the newsgroup)

Jul 23 '05 #2

P: n/a
> t = t.replace(/#/g,'\x1D')

# is the example delimiter
1D is hexadecimal for 29


Thanks

Mark
Jul 23 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.