473,320 Members | 1,845 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,320 software developers and data experts.

PHP: Simple question

In C and other languages I have had the need to convert from a character to
an integer. This is easy. Now, however, this is the first time I have had
to do this in PHP and I can't find the proper function. The reason I need
this is that upon downgrading to MySQL 4.0.7 (upon changing servers), data
that are in the tables contain characters that are not translated properly.
These characters are (at least two of them are) â and ?. I want to decode
part of the string to its integer representation to see how I can handle
this problem. Interestingly, the character T translates properly. The
actual sequence (or one of them) is â?T

I would love to avoid the necessity of fixing all those strings in the
database.

--
Shelly

PS: I included the PHP prefix label for the filtering challenged :-)
Nov 13 '07 #1
2 1153
On 13 Nov, 15:15, "Shelly" <sheldonlg.n...@asap-consult.comwrote:
In C and other languages I have had the need to convert from a character to
an integer.
try ord()

C.

Nov 13 '07 #2
C. (http://symcbean.blogspot.com/) wrote:
On 13 Nov, 15:15, "Shelly" <sheldonlg.n...@asap-consult.comwrote:
>In C and other languages I have had the need to convert from a
character to an integer.

try ord()

C.
Thanks, that worked. I knew it had to be simple.

--
Shelly
Nov 13 '07 #3

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

Similar topics

33
by: Bob | last post by:
When I first started in web programming (I left it for more than a few years) I programmed my web pages in C and a little perl. Now that I have a need to come back to web programming I find that...
27
by: Chris | last post by:
Hi, I have a form for uploading documents and inserting the data into a mysql db. I would like to validate the form. I have tried a couple of Javascript form validation functions, but it...
1
by: macklin01 | last post by:
Hi, everybody. I'm trying to do some last cleaning up on the following php page I wrote: http://www.math.uci.edu/~pmacklin/Publications.php This URL parses an XML file of publications: ...
27
by: comp.lang.tcl | last post by:
My TCL proc, XML_GET_ALL_ELEMENT_ATTRS, is supposed to convert an XML file into a TCL list as follows: attr1 {val1} attr2 {val2} ... attrN {valN} This is the TCL code that does this: set...
15
by: himilecyclist | last post by:
My State government organization has written a PHP/MySQL application which has been in production for about 6 months and has been highly successful. We are now embarking on a similar database...
9
by: Ben | last post by:
Hello, I'll bet this has been asked a million times but I can't seem to find a thread that gives the clear example I need. This PC has MySQL and IIS configured and running. The MySQL database is...
6
by: Ronald Raygun | last post by:
I want to be able to randomly select the following from an array: 1). An image 2). A piece of text (name of tge image) 3). A piece of text (description of the image) I want to be able to...
5
by: SM | last post by:
Hello I have simple question using simpleXML and PHP. i have an xml file that looks like this: <?xml version="1.0" encoding="UTF-8"?> <discography version="0.01"> <CD>...
4
by: maheshgupta0248 | last post by:
Hi all, Im a newbie in php, started learning php on my own. I want to create small website using php, that contains links for two simple webpages > C questions > C++ questions C questions...
3
by: deepaks85 | last post by:
Hi Friends, I have a simple HTML form and simple PHP code which sends the filled information at my email address. Now, I am trying to get Page URL and Page Title at my email while submitting a...
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

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.