International Character Sets URL Encoding MS SQL

I am trying to URL Encode a list of names from inside MS SQL using a function I found at the following Url : http://sqlblog.com/blogs/peter_debetta/archive/2007/03/09/t-sql-urlencode.aspx

The issue I am coming up against is it does not seem to handle international character sets, like the Ø from Scandinavian languages. I am passing over the data as NVARCHAR, the return character for the Ø seems to be a question mark instead.
AbeSpainAsked:
Who is Participating?

[Webinar] Streamline your web hosting managementRegister Today

x
 
Habib PourfardConnect With a Mentor Software DeveloperCommented:
it is as a result of the collation in the following line:

IF @c LIKE N'[A-Za-z0-9()''*\-._!~]' COLLATE Latin1_General_BIN ESCAPE N'\' COLLATE Latin1_General_BIN

Open in new window


You can alter function and replace Latin1_General_BIN with scandinavian collation.
0
 
AbeSpainAuthor Commented:
That doesn't seem to help, the return string does have the correct character but is not urlencoded.
0
 
Habib PourfardConnect With a Mentor Software DeveloperCommented:
I think  in addition to changing of collation, if you add Scandinavian characters to the end of this string (before bracket) it should be working:

IF @c LIKE N'[A-Za-z0-9()''*\-._!~ØØØØØØ]'
0
All Courses

From novice to tech pro — start learning today.