473,396 Members | 1,590 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Insert ASCII charaters

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
2 2657
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
> t = t.replace(/#/g,'\x1D')

# is the example delimiter
1D is hexadecimal for 29


Thanks

Mark
Jul 23 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: news | last post by:
I have no idea if this is a Linux issue or PHP. Looking for clues here. I have a PHP script which I use to upload a CSV spreadsheet into a mySQL database. (The script follows here in a sec.) I...
1
by: Anoop | last post by:
Hi, I have a table that contains a huge number of fields, out of which 3 are VARCHAR2(2000). I am using a Orcale 9i with UTF8 char set. The data I am trying to insert is ASCII (English). When I...
9
by: Curtis Stanford | last post by:
I'm in a situation where I need to load an ASCII file into a database. No sweat so far right? The records are indexed by date and I have a unique index on date. The ASCII can overlap, meaning it...
11
by: Chris Fink | last post by:
I have setup an Oracle table which contains a blob field. How do I insert data into this field using C# and ADO.net?
0
by: jcharth | last post by:
Hello I remember there is a way to insert special charaters with ? but i cant find an example right now i am inserting data using a simple sql command line but i would like to replace my values ...
24
by: ChaosKCW | last post by:
Hi I am reading from an oracle database using cx_Oracle. I am writing to a SQLite database using apsw. The oracle database is returning utf-8 characters for euopean item names, ie special...
16
by: DBC User | last post by:
Hi, I have a small XML file, I uploaded to a web page. I have the following code to convert the content I downloaded from web to xml and is giving "Illegal characters in path", but when I try to...
15
by: abracad_1999 | last post by:
I am trying to populate a table with the following insert query run through phpmyadmin. When I attempt to run it phpmyadmin just freezes. After a while "Fatal error: Maximum execution time of 300...
2
by: zswanson | last post by:
Hi everyone, I receive a variety of text based files that seperates each row by a single delimiter, usually '~'. I use BULK INSERT to transfer the file from a text file to a temporary table. It...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.