Problem with the french character with sql server 2005
-
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
-
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
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.
-
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
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 @TestTableCheck 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
andSqlConnection
. 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
-
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.
-
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:
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.
-
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.
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:
-
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:
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.
-
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.
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 :-DI are Troll :suss: