473,406 Members | 2,343 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,406 software developers and data experts.

converting data

Hi Gurus

I have a database full of text that I have downloaded from a website (ftp download, read file, parse file (i.e. break it down into
parts), move it into a table, etc...).

My next step now is to load this data into a MySQL database on the net for a PHP website.

HOWEVER, the funny characters on the original website (e.g. unicode characters, etc.... etc...) are doing really nasty things. The
MySQL thaat I use does not support unicode, so I want to reduce it down to just asci characters (to keep it simple).

I have two questions:
a. how do I make sure that all the data in my database are ascii characters?
b. do you agree with my course of action or do you suggest another way?

TIA

- Nicolaas
Nov 13 '05 #1
1 1264

"WindAndWaves" <ac****@ngaru.com> wrote in message news:SX*********************@news.xtra.co.nz...
Hi Gurus

I have a database full of text that I have downloaded from a website (ftp download, read file, parse file (i.e. break it down into
parts), move it into a table, etc...).

My next step now is to load this data into a MySQL database on the net for a PHP website.

HOWEVER, the funny characters on the original website (e.g. unicode characters, etc.... etc...) are doing really nasty things. The MySQL thaat I use does not support unicode, so I want to reduce it down to just asci characters (to keep it simple).

I have two questions:
a. how do I make sure that all the data in my database are ascii characters?
b. do you agree with my course of action or do you suggest another way?

TIA

- Nicolaas


If anyone is interested in an answer to this question, I basically did the following to find out where the non-asci characters where
and then replaced them.

function ascionisetable(mytable as string)
dim r as recordset
dim f as field
dim x as string
dim y as long
dim i as long
dim ii as long
dim s as string

set r = currentdb.openrecordset(mytable)
do while not r.eof
for each f in r.fields
s = nz(f.value, "")
ii = len(s)
for i = 1 to ii
x = mid(s,i)
y = ascw(x)
select case y
case is<0, is > 128, 64, 34, 39 'these are special characters in html (e.g. >, <, ", ')
'record and replace (using conversion table
next i
next f
r.movenext
loop
Nov 13 '05 #2

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

Similar topics

0
by: Dan Stromberg | last post by:
I've written up a page about how to convert native binary data to another platform's native binary data, as I did some fortran data conversions for a client. The programs and documentation are...
2
by: Govind | last post by:
Hi All, I want to Convert 32 bit integers to byte in right alighed format . For 32 = the usual way is BitConverter.GetBytes(int32)==> xx xx 00 00 , but i want right aligned like 00 00 xx xx.Is...
4
by: mustafa | last post by:
Dear sir , I have built my application in visual basic 6.0 and crystal Report8.5 , Now i migrated my application to VB.net using the upgrade wizard.My visual basic form is upgraded to vb.net...
3
by: Pete Davis | last post by:
I've never done this in C# so I don't know what the appropriate way of doing it is. I've got an array of bytes and I need to convert the array into "usable" data. For example, the first 4 bytes...
32
by: robert d via AccessMonster.com | last post by:
I'm looking at converting DAO to ADO in my app. All of my DAO connections are of the following structure: Dim wsName As DAO.Workspace Dim dbName As DAO.Database Dim rsName As DAO.Recordset ...
3
by: Sharon | last post by:
I have a buffer of byte that contains a raw data of a 1 byte-per-pixel image data. I need to convert this buffer to a Bitmap of Format32bppArgb and to a Bitmap of Format24bppRgb. Can anybody...
4
by: Bob Alston | last post by:
Anyone have experience with converting an access app from Jet database to Mysql? I am specifically looking for any changes I would have to make to my access forms, queries, modules, vba code, etc....
1
by: SLC via DBMonster.com | last post by:
Hello I'm a newbie to this and I need help, please My question is, we currently have a IDMS db and will be converting to DB2. What are the things I should do? The IDMS has not been documented very...
3
by: psbasha | last post by:
Hi , When ever we read any data from file ,we read as a single line string ,and we convert the respective field data available in that string based on the data type ( say int,float ). ...
0
Krishna Ladwa
by: Krishna Ladwa | last post by:
In Sql Server 2000 Version, I found that no Notification message box appears when converting text column to varchar but the data gets truncated to the given size for the varchar. Whereas it appears...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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
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
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
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
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
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.