473,480 Members | 1,876 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Passing unicode characters in forms

I have as issue I am finding hard to research.

I use a stored proecdure in SQL 2000 to provide search capability for
our database of news stories and articles. Being an international
magazine publisher we use foreign characters extensively.

When searching for words (I am using Full Text Indexing and using the
CONTAINSTABLE method) with accented characters such as Møller (Second
character is Alt+0248) the form receives back Møller

When this is passed to the stored procedure it only searches for the
single character M

Is it possible to pass the unicode characters to SQL properly using a
built in function or do I have to recreate the string manually searching
for unicode characters as passed by the browser and recreate them as
proper unicode characters?

M@t :o)

Nov 17 '05 #1
5 4052
Hi,

Use the N perfix :

Select From TestTable where myfield = N'....'
http://support.microsoft.com/default...port.microsoft.
com:80/support/kb/articles/Q239/5/30.ASP&NoWebContent=1

Natty Gur, CTO
Dao2Com Ltd.
28th Baruch Hirsch st. Bnei-Brak
Israel , 51114

Phone Numbers:
Office: +972-(0)3-5786668
Fax: +972-(0)3-5703475
Mobile: +972-(0)58-888377

Know the overall picture
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 17 '05 #2


It's not the passing of data in unicode format that's the problem but
the encoding that is applied at the web site - as in my original post
you can see that I am getting out "M&#248ller" when I enter "Møller" - I
need to be able to turn the &#248 into a unicode char before I pass it.

Also as I am using a stored procedure I don't believe I can prefix the
paramter name with N to indicate that it is Unicode - I have to set the
paramter up as nvarchar(x) in the stored procedure instead.

M@t :o)

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 17 '05 #3


Just to confirm for anyone reading on the web - my problem is in
receiving "M&#248ller" from the web form. I just realised that web
sites are translating the &#248 in my original post to a slashed "O"

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 17 '05 #4
Hello Matt,

I think you could try add encoding in web.config file.

Also, please save the aspx file with encoding info. To achieve it, please save the file in VS.NET IDE and...:
-----------------------------------------
Advanced Save Options Dialog Box
Use this dialog box to specify non-default language encoding options and to register your line-ending character preferences
for an open file. To access this dialog box, open a file in Visual Studio and choose Advanced Save Options on the File
menu.

Encoding
Use this list box to apply a new language encoding scheme to the target file.
Line Endings
When creating a file intended for distribution to users of different operating systems, you can select one of the following
carriage return or line feed options to ensure consistent document formatting.
----------------------------------

Hope it helps.

Best regards,
Yanhong Huang
Microsoft Online Partner Support

Get Secure! - www.microsoft.com/security
This posting is provided "AS IS" with no warranties, and confers no rights.

--------------------
!From: Matthew Thompson <ma**************@lrfairplay.com>
!References: <er**************@TK2MSFTNGP09.phx.gbl>
!X-Newsreader: AspNNTP 1.50 (ActionJackson.com)
!Subject: Re: Passing unicode characters in forms
!Mime-Version: 1.0
!Content-Type: text/plain; charset="us-ascii"
!Content-Transfer-Encoding: 7bit
!Message-ID: <#q**************@TK2MSFTNGP12.phx.gbl>
!Newsgroups: microsoft.public.dotnet.framework.aspnet
!Date: Wed, 30 Jul 2003 03:53:33 -0700
!NNTP-Posting-Host: actionjackson133.dsl.frii.net 216.17.147.133
!Lines: 1
!Path: cpmsftngxa06.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFTN GP12.phx.gbl
!Xref: cpmsftngxa06.phx.gbl microsoft.public.dotnet.framework.aspnet:163298
!X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet
!
!
!
!Just to confirm for anyone reading on the web - my problem is in
!receiving "M&amp;#248ller" from the web form. I just realised that web
!sites are translating the &amp;#248 in my original post to a slashed "O"
!
!*** Sent via Developersdex http://www.developersdex.com ***
!Don't just participate in USENET...get rewarded for it!
!
Nov 17 '05 #5
Hello Matt,

I saw a similar post in the group and reply you there. Here is the link for your reference. Thanks.

http://groups.google.com/groups?hl=e...23ynVDHA.2248%
40TK2MSFTNGP10.phx.gbl&rnum=1&prev=/groups%3Fhl%3Den%26lr%3D%26ie%3DUTF-8%26oe%3DUTF-8%26q%
3DPassing%2Bunicode%2Bcharacters%2Bin%2Bforms%26sa %3DN%26tab%3Dwg

Best regards,
Yanhong Huang
Microsoft Online Partner Support

Get Secure! - www.microsoft.com/security
This posting is provided "AS IS" with no warranties, and confers no rights.

--------------------
!From: Matthew Thompson <ma**************@lrfairplay.com>
!References: <er**************@TK2MSFTNGP09.phx.gbl>
!X-Newsreader: AspNNTP 1.50 (ActionJackson.com)
!Subject: Re: Passing unicode characters in forms
!Mime-Version: 1.0
!Content-Type: text/plain; charset="us-ascii"
!Content-Transfer-Encoding: 7bit
!Message-ID: <eI**************@TK2MSFTNGP09.phx.gbl>
!Newsgroups: microsoft.public.dotnet.framework.aspnet
!Date: Wed, 30 Jul 2003 03:43:51 -0700
!NNTP-Posting-Host: actionjackson133.dsl.frii.net 216.17.147.133
!Lines: 1
!Path: cpmsftngxa06.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFTN GP09.phx.gbl
!Xref: cpmsftngxa06.phx.gbl microsoft.public.dotnet.framework.aspnet:163295
!X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet
!
!
!
!It's not the passing of data in unicode format that's the problem but
!the encoding that is applied at the web site - as in my original post
!you can see that I am getting out "M&#248ller" when I enter "Møller" - I
!need to be able to turn the &#248 into a unicode char before I pass it.
!
!Also as I am using a stored procedure I don't believe I can prefix the
!paramter name with N to indicate that it is Unicode - I have to set the
!paramter up as nvarchar(x) in the stored procedure instead.
!
!M@t :o)
!
!*** Sent via Developersdex http://www.developersdex.com ***
!Don't just participate in USENET...get rewarded for it!
!
Nov 17 '05 #6

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

Similar topics

5
5064
by: Borko | last post by:
hi I am having problems getting unicode characters into VB. Using VB6 (sp3) and Access 2000 Characters are displayed correctly in Access, just when I use ADODB (2.7) to read them in VB i get ?...
3
5455
by: Kidus Yared | last post by:
I am having a problem displaying Unicode characters on my Forms labels and buttons. After coding Button1.Text = unicode; where the unicode is a Unicode character or string (‘\u1234’ or...
3
5602
by: Mohammad-Reza | last post by:
We are writing an application for a specific culture(Arabic or Farsi). This application involves using DataAdapter, OLEDB Connection and the DataSet. We didn't use the .NET data binding, just field...
3
17938
by: john | last post by:
I need to produce a RTF-document which is filled with data from a database. I've created a RTF-document in WordPad (a template, so to speak) which contains 'placeholders', for example '<dd01>',...
9
1416
by: R.Kaiser | last post by:
Where can I find which Unicode characters are valid for identifiers in Visual C++ 2005? Thanks Richard
13
14667
by: Kelvin Moss | last post by:
Hi all, How could one write an strstr function to work with unicode characters? Are there existing implementations/solutions/api for doing so? Any pointers would be appreciated. Thanks ..
6
3894
by: geegeegeegee | last post by:
Hi All, I have come across a difficult problem to do with extracting UniCode characters from RTF strings. A detailed description of my problem is below, if anyone could help, it would be much...
0
571
by: M.-A. Lemburg | last post by:
On 2008-07-01 20:31, Peter Bulychev wrote: You could write a codec which translates Unicode into a ASCII lookalike characters, but AFAIK there is no standard for doing this. I guess the best...
6
10633
vekipeki
by: vekipeki | last post by:
I am having a problem with basic drawing of unicode characters in Windows 2000 and XP. I have written a simplest possible C# WinForms program to test it (just create a new Windows Forms C#...
0
6904
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...
1
6735
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
6895
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
5326
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
4770
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
4476
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
2992
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
1296
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
0
176
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

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.