Forum Moderators: phranque
(Sorry if this is the wrong place for this question)
I noticed that when a customer from a country that uses accented characters in their alphabet that their query usually fails at some point of the creation process.
What's the best way that I can either convert, strip or encode the name field to stop this.
Actually, I have no idea how to handle this best.
I use an SQL database and the name field is set to nvarchar which should be able to handle any character, but it seems like the URL is being corrupted.
I'm using ASP and II6.
Thanks
Mick
their query usually fails
Do you mean "query" as in database query?
If you do things like this,
insert into table (field) values('some value');
Any single quote will error, you need to either double it, escape it or encode it:
insert into table (field) values('it''s a boy!');
insert into table (field) values('it\'s a boy!');
insert into table (field) values('it%27s a boy!');
If it's not that, you might look into the encoding used for your database.