473,772 Members | 2,414 Online
Bytes | Software Development & Data Engineering Community
+ 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 4077
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&NoWebCon tent=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.c om>
!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.publi c.dotnet.framew ork.aspnet
!Date: Wed, 30 Jul 2003 03:53:33 -0700
!NNTP-Posting-Host: actionjackson13 3.dsl.frii.net 216.17.147.133
!Lines: 1
!Path: cpmsftngxa06.ph x.gbl!TK2MSFTNG P08.phx.gbl!TK2 MSFTNGP12.phx.g bl
!Xref: cpmsftngxa06.ph x.gbl microsoft.publi c.dotnet.framew ork.aspnet:1632 98
!X-Tomcat-NG: microsoft.publi c.dotnet.framew ork.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%3De n%26lr%3D%26ie% 3DUTF-8%26oe%3DUTF-8%26q%
3DPassing%2Buni code%2Bcharacte rs%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.c om>
!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.publi c.dotnet.framew ork.aspnet
!Date: Wed, 30 Jul 2003 03:43:51 -0700
!NNTP-Posting-Host: actionjackson13 3.dsl.frii.net 216.17.147.133
!Lines: 1
!Path: cpmsftngxa06.ph x.gbl!TK2MSFTNG P08.phx.gbl!TK2 MSFTNGP09.phx.g bl
!Xref: cpmsftngxa06.ph x.gbl microsoft.publi c.dotnet.framew ork.aspnet:1632 95
!X-Tomcat-NG: microsoft.publi c.dotnet.framew ork.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
5135
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 ? character instead of unicode characters. I will display them in TreeView (capable of Unicode) Is there any patch, fix or something, I know this thing is going around
3
5470
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 “\u1234”) It seems to work the first time I set the button to the Unicode character. After a while, when saving my code, I get a pop-up window stating that I need to save the file as a Unicode else my changes will not be saved. Seance I do not want...
3
5624
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 TextBoxes with the data retrieved from the DataSet but whole system seems to be unable to update the database (.mdb file) with Unicode characters. Instead of displaying the correct characters the application displays question marks (?). Isn't...
3
17975
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>', '<dd02>', etc. I read the entire template into a StringBuilder and then perform a simple 'replace' on it, using a Hashtable. The keys in the Hashtable are strings representing the placeholders and the Hashtable's values contain data
9
1441
by: R.Kaiser | last post by:
Where can I find which Unicode characters are valid for identifiers in Visual C++ 2005? Thanks Richard
13
14702
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
3926
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 appreciated. I've tried to make the problem as clear as possible, but if any clarification is needed please let me know. Task -Convert RTF2 formatted text containing foreign characters (UniCode) to PlainText. Background -We are using Stephan...
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 choice is to use the Unicode code point names as basis. These can be accessed via unicodedata.name(). You can then create a mapping which can be processed by the character map codec.
6
10718
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# application and add a Paint event handler): public partial class Form1 : Form { public Form1() { InitializeComponent();
0
10261
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10103
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10038
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8934
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7460
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5354
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 last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5482
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4007
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 we have to send another system
3
2850
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 can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.