Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Database & SysAdmin
  3. Database
  4. Problem with the french character with sql server 2005

Problem with the french character with sql server 2005

Scheduled Pinned Locked Moved Database
databasequestionsql-serversysadminjson
8 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • P Offline
    P Offline
    pranavcool
    wrote on last edited by
    #1

    Hi, I am facing some problems related to french characters. One of the character "₣" is not supported by sql server 2005. rest of the french characters is suppoeted by sql server 2005. When ever i tried to insert data or run a select query it returns as a question mark "?". Full text search is provided on table for search functionality.

    Select doc_id,1 from DocumentMaster Where 1=1
    AND (CONTAINS(Document_Filename, '"*Œ*"') OR CONTAINS(Document_Filename_French, '"*Œ*"'))
    AND (CONTAINS(Document_Filename, '"*œ*"') OR CONTAINS(Document_Filename_French, '"*œ*"'))
    AND (CONTAINS(Document_Filename, '"*€*"') OR CONTAINS(Document_Filename_French, '"*€*"'))
    AND (CONTAINS(Document_Filename, '"*?*"') OR CONTAINS(Document_Filename_French, '"*?*"'))

    i have read in couple of the site that the data type of the colum should be nvarchar or ntext for french characters to support. I even that. but then also it is not supporting the "₣" french character. Rest french character it is supporting. please suggest any solution. Regards,

    Pranav Dave

    L L 2 Replies Last reply
    0
    • P pranavcool

      Hi, I am facing some problems related to french characters. One of the character "₣" is not supported by sql server 2005. rest of the french characters is suppoeted by sql server 2005. When ever i tried to insert data or run a select query it returns as a question mark "?". Full text search is provided on table for search functionality.

      Select doc_id,1 from DocumentMaster Where 1=1
      AND (CONTAINS(Document_Filename, '"*Œ*"') OR CONTAINS(Document_Filename_French, '"*Œ*"'))
      AND (CONTAINS(Document_Filename, '"*œ*"') OR CONTAINS(Document_Filename_French, '"*œ*"'))
      AND (CONTAINS(Document_Filename, '"*€*"') OR CONTAINS(Document_Filename_French, '"*€*"'))
      AND (CONTAINS(Document_Filename, '"*?*"') OR CONTAINS(Document_Filename_French, '"*?*"'))

      i have read in couple of the site that the data type of the colum should be nvarchar or ntext for french characters to support. I even that. but then also it is not supporting the "₣" french character. Rest french character it is supporting. please suggest any solution. Regards,

      Pranav Dave

      L Offline
      L Offline
      Luc Pattyn
      wrote on last edited by
      #2

      Hi, I don;t know the F-like character your message shows, and which you call a "french character". What is its name? Can you show us some words containing it? do you know its unicode number? are there things you can do with it successfully? :)

      Luc Pattyn [Forum Guidelines] [Why QA sucks] [My Articles]


      Merry Christmas and a Happy New Year to all.


      L 1 Reply Last reply
      0
      • P pranavcool

        Hi, I am facing some problems related to french characters. One of the character "₣" is not supported by sql server 2005. rest of the french characters is suppoeted by sql server 2005. When ever i tried to insert data or run a select query it returns as a question mark "?". Full text search is provided on table for search functionality.

        Select doc_id,1 from DocumentMaster Where 1=1
        AND (CONTAINS(Document_Filename, '"*Œ*"') OR CONTAINS(Document_Filename_French, '"*Œ*"'))
        AND (CONTAINS(Document_Filename, '"*œ*"') OR CONTAINS(Document_Filename_French, '"*œ*"'))
        AND (CONTAINS(Document_Filename, '"*€*"') OR CONTAINS(Document_Filename_French, '"*€*"'))
        AND (CONTAINS(Document_Filename, '"*?*"') OR CONTAINS(Document_Filename_French, '"*?*"'))

        i have read in couple of the site that the data type of the colum should be nvarchar or ntext for french characters to support. I even that. but then also it is not supporting the "₣" french character. Rest french character it is supporting. please suggest any solution. Regards,

        Pranav Dave

        L Offline
        L Offline
        Lost User
        wrote on last edited by
        #3

        Try this one;

        DECLARE @TestTable AS TABLE (
        TestCol NVARCHAR(2) COLLATE Latin1_General_BIN
        )
        INSERT INTO @TestTable VALUES (N'₣')
        INSERT INTO @TestTable VALUES (N'Œ')
        SELECT * FROM @TestTable

        Check whether the column that you're storing data into is really accepting unicode-text, make sure the collation is set correctly, and check whether you're passing unicode or ascii as a parameter :) --edit--

        pranavcool wrote:

        i have read in couple of the site that the data type of the colum should be nvarchar or ntext for french characters to support.

        That is correct. Unfortunatly, there's other places where things can go wrong. Even the value of the string that you're inspecting in the debugger is displayed using a font. The task would be to verify that SQL Server works correctly, and then to find the source of the error.

        pranavcool wrote:

        When ever i tried to insert data or run a select query it returns as a question mark "?".

        I'm guessing that this is due to the Management Studio, since you're probably not on DOS using isql. Try a small console-application, you'll see that SQL Server correctly saves and retrieves the character. That is, using the standard SqlCommand and SqlConnection. You're not displaying the result/seeing the '?' in a browser by any chance? Are you using MONO? Or an ODBC-driver?

        I are Troll :suss:

        modified on Monday, December 28, 2009 12:34 PM

        1 Reply Last reply
        0
        • L Luc Pattyn

          Hi, I don;t know the F-like character your message shows, and which you call a "french character". What is its name? Can you show us some words containing it? do you know its unicode number? are there things you can do with it successfully? :)

          Luc Pattyn [Forum Guidelines] [Why QA sucks] [My Articles]


          Merry Christmas and a Happy New Year to all.


          L Offline
          L Offline
          Lost User
          wrote on last edited by
          #4

          Luc Pattyn wrote:

          What is its name?

          "French Franc", a deprecated monetary unit :)

          Luc Pattyn wrote:

          are there things you can do with it successfully?

          Compare beer-prices with aged Frenchmen?

          I are Troll :suss:

          L 1 Reply Last reply
          0
          • L Lost User

            Luc Pattyn wrote:

            What is its name?

            "French Franc", a deprecated monetary unit :)

            Luc Pattyn wrote:

            are there things you can do with it successfully?

            Compare beer-prices with aged Frenchmen?

            I are Troll :suss:

            L Offline
            L Offline
            Luc Pattyn
            wrote on last edited by
            #5

            Eddy Vluggen wrote:

            "French Franc"

            really? doesn't look anything like the symbol here[^], which is Unicode U+20A3 and should pose no problem at all. :)

            Luc Pattyn [Forum Guidelines] [Why QA sucks] [My Articles]


            Merry Christmas and a Happy New Year to all.


            L 1 Reply Last reply
            0
            • L Luc Pattyn

              Eddy Vluggen wrote:

              "French Franc"

              really? doesn't look anything like the symbol here[^], which is Unicode U+20A3 and should pose no problem at all. :)

              Luc Pattyn [Forum Guidelines] [Why QA sucks] [My Articles]


              Merry Christmas and a Happy New Year to all.


              L Offline
              L Offline
              Lost User
              wrote on last edited by
              #6

              Luc Pattyn wrote:

              really?

              Yup, they're the same :) Well, ehr.. the example doesn't look like that picture, but like the font that it shows below. Scroll down on that link that you sent me and the same symbol should be there in the table "Java Data". It might be that your browser is (temporarily?) set to something different than UTF-8? Or you're using a different font-set, that could also explain it's different appearance. It shouldn't pose a problem like you said. Then again, it doesn't behave like the 'other' special characters. If I omit the N-prefix in the INSERT statement, then it will indeed put a questionmark in there. Not so for that crazy 'Œ' symbol.

              I are Troll :suss:

              L 1 Reply Last reply
              0
              • L Lost User

                Luc Pattyn wrote:

                really?

                Yup, they're the same :) Well, ehr.. the example doesn't look like that picture, but like the font that it shows below. Scroll down on that link that you sent me and the same symbol should be there in the table "Java Data". It might be that your browser is (temporarily?) set to something different than UTF-8? Or you're using a different font-set, that could also explain it's different appearance. It shouldn't pose a problem like you said. Then again, it doesn't behave like the 'other' special characters. If I omit the N-prefix in the INSERT statement, then it will indeed put a questionmark in there. Not so for that crazy 'Œ' symbol.

                I are Troll :suss:

                L Offline
                L Offline
                Luc Pattyn
                wrote on last edited by
                #7

                yup. the 'Œ' character (and eszet 'ß' and most accented characters used in Western languages) is part of code page 1252, whereas the French Franc and most other (possibly obsolete) monetary symbols are not. :)

                Luc Pattyn [Forum Guidelines] [Why QA sucks] [My Articles]


                Merry Christmas and a Happy New Year to all.


                L 1 Reply Last reply
                0
                • L Luc Pattyn

                  yup. the 'Œ' character (and eszet 'ß' and most accented characters used in Western languages) is part of code page 1252, whereas the French Franc and most other (possibly obsolete) monetary symbols are not. :)

                  Luc Pattyn [Forum Guidelines] [Why QA sucks] [My Articles]


                  Merry Christmas and a Happy New Year to all.


                  L Offline
                  L Offline
                  Lost User
                  wrote on last edited by
                  #8

                  Luc Pattyn wrote:

                  the 'Œ' character (and eszet 'ß' and most accented characters used in Western languages) is part of code page 1252, whereas the French Franc and most other (possibly obsolete) monetary symbols are not.

                  Not even the need for a CHCP 1252, since it gets stuffed into a unicode field. Question seems answered though, I'll wait for the repost :-D

                  I are Troll :suss:

                  1 Reply Last reply
                  0
                  Reply
                  • Reply as topic
                  Log in to reply
                  • Oldest to Newest
                  • Newest to Oldest
                  • Most Votes


                  • Login

                  • Don't have an account? Register

                  • Login or register to search.
                  • First post
                    Last post
                  0
                  • Categories
                  • Recent
                  • Tags
                  • Popular
                  • World
                  • Users
                  • Groups