Web Wiz - Green Windows Web Hosting

  New Posts New Posts RSS Feed - Special character problem
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Forum LockedSpecial character problem

 Post Reply Post Reply
Author
jasjmorris View Drop Down
Newbie
Newbie
Avatar

Joined: 03 September 2009
Status: Offline
Points: 13
Post Options Post Options   Thanks (0) Thanks(0)   Quote jasjmorris Quote  Post ReplyReply Direct Link To This Post Topic: Special character problem
    Posted: 10 September 2009 at 7:21pm

Ok i have a new one for you.

I tested here on the forums and it doesn't do the same but on my server when the users are adding special characters like ½ it will look correct on insert but after submit and going in a viewing the post it will show ½.   Checked in the database mysql and it added both special characters in the field.
 
now i've set it up so users can go back in and edit their own post and when they do that it will just show the ½ by itself.
 
is there anyone that can explain/help me with this i am scratching my head hard on this one.. i think i am getting bits of hair out.
 
I could honestly care less about the special characters but the users are complaining about it.. parently they just can't type 1/2.. lol
Back to Top
WebWiz-Bruce View Drop Down
Admin Group
Admin Group
Avatar
Web Wiz Developer

Joined: 03 September 2001
Location: Bournemouth
Status: Offline
Points: 9844
Post Options Post Options   Thanks (0) Thanks(0)   Quote WebWiz-Bruce Quote  Post ReplyReply Direct Link To This Post Posted: 11 September 2009 at 6:16am
This will be a character encoding issue.

You could try changing the encoding on your web pages, for example this page is set to UTF-8:-

<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />

It could also be coursed by the character set on the mySQL database. I have to admit I much prefer SQL Server when working with Microsoft technologies they work much better together.

However, if you change encodings you do risk messing up the encoding displayed for everything else already saved to the database.


Back to Top
jasjmorris View Drop Down
Newbie
Newbie
Avatar

Joined: 03 September 2009
Status: Offline
Points: 13
Post Options Post Options   Thanks (0) Thanks(0)   Quote jasjmorris Quote  Post ReplyReply Direct Link To This Post Posted: 12 September 2009 at 6:00am

Thanks for the response. I have check and in my header file i already had that code on the top.

any checked my database its set to "UTF-8 Unicode (utf8)"

So is there anything else it could be, or i could try?
Back to Top
jasjmorris View Drop Down
Newbie
Newbie
Avatar

Joined: 03 September 2009
Status: Offline
Points: 13
Post Options Post Options   Thanks (0) Thanks(0)   Quote jasjmorris Quote  Post ReplyReply Direct Link To This Post Posted: 14 September 2009 at 6:26pm

any thoughts on this yet? hate to be a pest.

Back to Top
WebWiz-Bruce View Drop Down
Admin Group
Admin Group
Avatar
Web Wiz Developer

Joined: 03 September 2001
Location: Bournemouth
Status: Offline
Points: 9844
Post Options Post Options   Thanks (0) Thanks(0)   Quote WebWiz-Bruce Quote  Post ReplyReply Direct Link To This Post Posted: 15 September 2009 at 11:57am
These types of encoding issues can be very difficult to fix as they are related to browser, server setup, sofwtare setup, etc., etc.

If changing the page encoding doesn't help the best solution I can offer is use SQL Server not mySQL as SQL Server I find is generally much better at these types of things than mySQL.
Back to Top
jasjmorris View Drop Down
Newbie
Newbie
Avatar

Joined: 03 September 2009
Status: Offline
Points: 13
Post Options Post Options   Thanks (0) Thanks(0)   Quote jasjmorris Quote  Post ReplyReply Direct Link To This Post Posted: 16 September 2009 at 8:34am
Alright thanks for the help anyways. I don't have the option for sql as the hosting is paid by the company.
Thank i could include a code to strip that character out of the output?
Back to Top
WebWiz-Bruce View Drop Down
Admin Group
Admin Group
Avatar
Web Wiz Developer

Joined: 03 September 2001
Location: Bournemouth
Status: Offline
Points: 9844
Post Options Post Options   Thanks (0) Thanks(0)   Quote WebWiz-Bruce Quote  Post ReplyReply Direct Link To This Post Posted: 16 September 2009 at 8:48am
What I would do is to replace the 1/2 character with the HTML encoding for it, so that the 1/2 stays in but is correctly displayed:-

strMyFormData = Replace(strMyFormData, "½", "&#189;")

Obviously replace the strMyFormData variable with what ever the name is of the variable that you read the form data into. You may also need to do a little paying around with the above if the ½ is encoded differently.
Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.08
Copyright ©2001-2026 Web Wiz Ltd.


Become a Fan on Facebook Follow us on X Connect with us on LinkedIn Web Wiz Blogs
About Web Wiz | Contact Web Wiz | Terms & Conditions | Cookies | Privacy Notice

Web Wiz is the trading name of Web Wiz Ltd. Company registration No. 05977755. Registered in England and Wales.
Registered office: Web Wiz Ltd, Unit 18, The Glenmore Centre, Fancy Road, Poole, Dorset, BH12 4FB, UK.

Prices exclude VAT at 20% unless otherwise stated. VAT No. GB988999105 - $, € prices shown as a guideline only.

Copyright ©2001-2026 Web Wiz Ltd. All rights reserved.