Passing unicode characters in forms

Ask a Question related to ASP.NET General, Design and Development.

  1. #1

    Default 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)

    Matthew Thompson Guest

  2. Similar Questions and Discussions

    1. AxAcroPDF LoadFile contains Unicode (CJK) characters
      I'm using AcroPDF.dll version 9.0 in my C#.Net Windows Forms application. I initialize an instance of the Adobe control, and use the LoadFile method...
    2. Unicode characters above FFFF
      How can I generate/display on a page/ Unicode characters based on unicode scalar values? I know ColdFusion function chr() works very good for...
    3. cfqueryparam unicode characters
      I am storing Unicode characters in sqlserver. If I use : SELECT * table values WHERE a=N"#val1#" it works fine. However if I use: ...
    4. Unicode characters and ado.
      I have an Access 2002 database which stores unicode characters. I am using adodb.recordset object to display these fields on a web page. If I were...
    5. entering unicode characters
      I would really appreciate some help with this. I am using mozilla (1.2.1) with XFree86 (3.3.6). How can I enter a unicode character into mozilla?
  3. #2

    Default Re: Passing unicode characters in forms

    Hi,

    Use the N perfix :

    Select From TestTable where myfield = N'....'


    [url]http://support.microsoft.com/default.aspx?scid=http://support.microsoft[/url].
    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 [url]http://www.developersdex.com[/url] ***
    Don't just participate in USENET...get rewarded for it!
    Natty Gur Guest

  4. #3

    Default Re: Passing unicode characters in forms



    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 [url]http://www.developersdex.com[/url] ***
    Don't just participate in USENET...get rewarded for it!
    Matthew Thompson Guest

  5. #4

    Default Re: Passing unicode characters in forms



    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 [url]http://www.developersdex.com[/url] ***
    Don't just participate in USENET...get rewarded for it!
    Matthew Thompson Guest

  6. #5

    Default Re: Passing unicode characters in forms

    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! - [url]www.microsoft.com/security[/url]
    This posting is provided "AS IS" with no warranties, and confers no rights.

    --------------------
    !From: Matthew Thompson <matthew.thompson@lrfairplay.com>
    !References: <erowwSoVDHA.2488@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: <#qLySjoVDHA.2228@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 [url]http://www.developersdex.com[/url] ***
    !Don't just participate in USENET...get rewarded for it!
    !


    Yan-Hong Huang[MSFT] Guest

  7. #6

    Default Re: Passing unicode characters in forms

    Hello Matt,

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

    [url]http://groups.google.com/groups?hl=en&lr=&ie=UTF-8&oe=UTF-8&threadm=%23COz%23ynVDHA.2248%[/url]
    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! - [url]www.microsoft.com/security[/url]
    This posting is provided "AS IS" with no warranties, and confers no rights.

    --------------------
    !From: Matthew Thompson <matthew.thompson@lrfairplay.com>
    !References: <erowwSoVDHA.2488@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: <eIU73doVDHA.2488@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 [url]http://www.developersdex.com[/url] ***
    !Don't just participate in USENET...get rewarded for it!
    !


    Yan-Hong Huang[MSFT] Guest

Posting Permissions

  • You may not post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139