Solved

Character encoding - Entries in Access Database

Posted on 2004-10-06
5
599 Views
Last Modified: 2008-03-10
Hi,

I've got a website where a user has to enter in some details and these are saved to a Micosoft Access Database. The problem is that when some users enter in "special" characters such as ñ,ç,ï they are not saved properly in the database.

I'm not sure if this problem arises when the user fills out the web form or when the data is transfered to the database. When I try from my computer on localhost or on the web, everything works okay...

Thanks for any help!
0
Comment
Question by:siono2
5 Comments
 
LVL 7

Accepted Solution

by:
kmorris1186 earned 125 total points
ID: 12237905
you could try using escape() to encode them using the %XX format (like %20 for a space, etc..)
then unescape() to unencode them.

just a thought.

When you try this on localhost they store in the access DB just fine? but not when doing this from another pc?
0
 
LVL 8

Assisted Solution

by:a_twixt_in_the_tale
a_twixt_in_the_tale earned 125 total points
ID: 12238271
In vbscript the equivalent would b

Server.URLEncode(Request.Form(<variable_name>)) befr inserting into DB

anyways ud have to unencode using javascript ;)
separate file
<SCRIPT language="javascript" runat=Server>
function w(s){
      var str = new String(s)
      return unescape(str.replace(/%26/g,"%26amp"));
}
</SCRIPT>

include this file in the asp page. function call w(<string>)

:)
Don
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

I have helped a lot of people on EE with their coding sources and have enjoyed near about every minute of it. Sometimes it can get a little tedious but it is always a challenge and the one thing that I always say is:  The Exchange of information …
This demonstration started out as a follow up to some recently posted questions on the subject of logging in: http://www.experts-exchange.com/Programming/Languages/Scripting/JavaScript/Q_28634665.html and http://www.experts-exchange.com/Programming/…
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.
This video shows how to remove a single email address from the Outlook 2010 Auto Suggestion memory. NOTE: For Outlook 2016 and 2013 perform the exact same steps. Open a new email: Click the New email button in Outlook. Start typing the address: …

744 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now