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

nonstandard symbols: function to replace?

Hey all.

Some of my writers are submitting stuff they've typed into Word (ughh),
meaning we get annoying symbols instead of " and '. I know I can build
a search and replace into my submissions form to stop these at the
source, but I don't want to run this through the existing 500 articles.
Is there some kind of method or function to display these? My
database-pulled content just displays a ? for them at the moment.

Matt

Nov 22 '05 #1
4 1332
guitarromantic wrote:
but I don't want to run this through the existing 500 articles.


Why not?

--
Toby A Inkster BSc (Hons) ARCS
Contact Me ~ http://tobyinkster.co.uk/contact

Nov 22 '05 #2
Because I'd have to manually go through each one and process it through
the system..? Or are you suggesting I run it into phpMyAdmin or
something and just do a global replace? That could work.

Nov 22 '05 #3

gu************@gmail.com wrote:
Because I'd have to manually go through each one and process it through
the system..? Or are you suggesting I run it into phpMyAdmin or
something and just do a global replace? That could work


best idea in my opinion would be to clean up before putting the stuff
into the database. once you have that clean up script, i'd adapt it to
run it over the 500 articles once and for all.

micha

Nov 22 '05 #4
guitarromantic wrote:
Because I'd have to manually go through each one and process it through
the system..?


Please quote the post you're replying to so that people know what you're
talking about.

No need to do it manually! Say you have a function "fixsymbols()" that can
fix the symbols, simply create a script like this:

$r = mysql_query("SELECT articleid, content FROM articles;");
while ($a = mysql_fetch_array($r))
{
$id = $a[0];
$content = addslashes(fixsymbols($a[1]));
$q = "UPDATE articles SET content='$content' WHERE articleid='$id';";
mysql_query($q);
}

--
Toby A Inkster BSc (Hons) ARCS
Contact Me ~ http://tobyinkster.co.uk/contact

Nov 22 '05 #5

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

Similar topics

1
by: Dr. Colombes | last post by:
Using MatPlotLib plot function, is there a way to get variable size plot symbols? For example, using symbol strings like 'o' (circle), 's' (square), 'x' (cross), etc., is there a way to specify...
7
by: Torbak | last post by:
I got some question about symbols in libraries ... In libraries, there is public symbols and "not public" symbols (private, static)... In C when we use the "static" keyword on the declaration of...
1
by: Torbak | last post by:
I got some question about symbols in libraries ... In libraries, there is public symbols and "not public" symbols (private, static)... In C when we use the "static" keyword on the declaration of...
0
by: Dan | last post by:
I am running two database instances of mysql (one on a nonstandard port). After granting users permissions I find that I can access mysql from other machines only if I use the standard port. When...
5
by: eScrewDotCom | last post by:
www.eScrew.com eScrew Welcome to eScrew! eScrew is eScrew and this is eScrew story. eScrew will tell you eScrew story if you promise eScrew to consider eScrew story as joke. eScrew story is...
2
by: magister | last post by:
Hello, Is there a way I can validate the input on a textbox for currency including all currency symbols.. At the moment I have it only for the current culture info, but most banks use several...
47
by: Pierre Barbier de Reuille | last post by:
Please, note that I am entirely open for every points on this proposal (which I do not dare yet to call PEP). Abstract ======== This proposal suggests to add symbols into Python. Symbols...
0
by: John Peterson | last post by:
I'm a little confused by the topics system here. I wanted to respond to this post but it was closed or something. But here is my follow up: Yes, I checked all that. My solution is a C++...
9
by: awagner | last post by:
I am compiling a C application on an HP Unix 11.23 platform using the C99 compiler. I am receiving the following three warning message from the /usr/include/sys/_mbstate_t.h include file. ...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
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: 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
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
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
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...

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.