Showing posts with label characters. Show all posts
Showing posts with label characters. Show all posts

Sunday, March 11, 2012

Accentuated characters SQL

I use Webmatrix together with Frontpage 2002.
In one of my Webmatrix pages I refer to a field "Prénom" when doing queries.

Sometimes after publishing these pages from my local to my hosted server the é disappears in the source code and SQL server does not find the column.

I have the feeling it has to do with codepage and/or Content.

Has anyone a precise idea.for a start, your columns should be of type nvarchar (or simlar n-prefixed column)
and literal strings in SQL should be n-prefixed also

UPDATE tblWhatever SET columnName = N'somé string with accénts'

this might help, if the problem is what I think it is.|||This is the case.

I have now realized that Frontpage produces pages with US/European character set, whereas Webmatrix uses UTF-8. Seems to be quite a mess making things compatible ...
Worse, when opening a Frontpage Ansi produced page with Web Matrix, this program strips out the accentuated characters, and you lose them in the process of saving.

Reverse, when you change the default in Frontpage to UTF-8, the european characters become unreadable in Web Matrix !

I do not yet know how to fix this.|||Frontpage?? Jesus H. Smith! I didn't think anyone still used that ;-)

1. what version? 2. is there anything in the options dialog which can force UTF-8 in FP?

accents in full-text searching

If I have accented characters in my table which is full-text indexed then I
cannot search for the corresponding non-accented character. e.g. I have the
character "é" in my column (which is nvarchar), so searching for "é" comes up
with results because it is actually entered as "é" in the database, but
searching for "e" does not come up with any results. I have tried changing
the collation on this column to SQL Collation "SQL_Latin1_General_CP1_CI_AI"
and then I tried Windows Collation "Latin1_General_CI_AI". My database
collation name is "Latin1_General_CI_AI". I've set the default full-text
language to 0 (neutral).
Does anyone know how to solve the problem of accent insensitivity for
full-text searching?
my select @.@.version is:
Microsoft SQL Server 2000 - 8.00.760 (Intel X86) Dec 17 2002 14:22:05
Copyright (c) 1988-2003 Microsoft Corporation Personal Edition on Windows NT
5.1 (Build 2600: Service Pack 2)
Thanks in advance
Enoch
This is handled correctly in SQL 2005. However in the meantime you should
trap for these accented versions of the words and expand your search for
both the accented and unaccented versions of the work.
So a search on bebe would be expanded to "bb" or "bebe".
There will be some correct stemming when you do a FreeText query is you are
using the French word breaker. For instance if you have removed noise words
for all verb forms of the verb to be (etre) from the French noise word list,
you will get search results to the accented versions of this word when doing
a FreeText search.
Hilary Cotter
Looking for a SQL Server replication book?
Now available for purchase at:
http://www.nwsu.com/0974973602.html
"Enoch" <Enoch@.discussions.microsoft.com> wrote in message
news:E10365FE-F791-4973-84F1-DC4C9596B1AD@.microsoft.com...
> If I have accented characters in my table which is full-text indexed then
> I
> cannot search for the corresponding non-accented character. e.g. I have
> the
> character "" in my column (which is nvarchar), so searching for "" comes
> up
> with results because it is actually entered as "" in the database, but
> searching for "e" does not come up with any results. I have tried
> changing
> the collation on this column to SQL Collation
> "SQL_Latin1_General_CP1_CI_AI"
> and then I tried Windows Collation "Latin1_General_CI_AI". My database
> collation name is "Latin1_General_CI_AI". I've set the default full-text
> language to 0 (neutral).
> Does anyone know how to solve the problem of accent insensitivity for
> full-text searching?
> my select @.@.version is:
> Microsoft SQL Server 2000 - 8.00.760 (Intel X86) Dec 17 2002 14:22:05
> Copyright (c) 1988-2003 Microsoft Corporation Personal Edition on Windows
> NT
> 5.1 (Build 2600: Service Pack 2)
> Thanks in advance
> Enoch
>

accented characters and ñ's

Hi,
I have a problem in a rss script, when i try to create a folder name that
contains accented charactes or ñ's, the folder is created WITHOUT these
characters.
Example:
rs.CreateFolder("�andú", "/", Nothing)
I run the script and then i go to the report manager and the folder created
is "and"
If i create the folder manually with the report manager it works OK, but i
need the script.
Even when i print this name through the console:
Console.WriteLine("�andú") ' Shows: and
This prints fine in a common vb.net console application, someone knows what
the problem ?
Thanks in advanceThis repros when you save the .RSS file as ANSI but when you save the .RSS
file as Unicode, it works.
Brian Welcker
Group Program Manager
Microsoft SQL Server
This posting is provided "AS IS" with no warranties, and confers no rights.
"Diego Belay" <Diego Belay@.discussions.microsoft.com> wrote in message
news:B63EB827-B112-409E-BFF9-7BFE8B43E23C@.microsoft.com...
> Hi,
> I have a problem in a rss script, when i try to create a folder name that
> contains accented charactes or ñ's, the folder is created WITHOUT these
> characters.
> Example:
> rs.CreateFolder("Ñandú", "/", Nothing)
> I run the script and then i go to the report manager and the folder
> created
> is "and"
> If i create the folder manually with the report manager it works OK, but i
> need the script.
> Even when i print this name through the console:
> Console.WriteLine("Ñandú") ' Shows: and
> This prints fine in a common vb.net console application, someone knows
> what
> the problem ?
> Thanks in advance
>|||it works now, thanks!
"Brian Welcker [MS]" wrote:
> This repros when you save the .RSS file as ANSI but when you save the .RSS
> file as Unicode, it works.
>
> --
> Brian Welcker
> Group Program Manager
> Microsoft SQL Server
> This posting is provided "AS IS" with no warranties, and confers no rights.
>
> "Diego Belay" <Diego Belay@.discussions.microsoft.com> wrote in message
> news:B63EB827-B112-409E-BFF9-7BFE8B43E23C@.microsoft.com...
> > Hi,
> > I have a problem in a rss script, when i try to create a folder name that
> > contains accented charactes or ñ's, the folder is created WITHOUT these
> > characters.
> >
> > Example:
> > rs.CreateFolder("�andú", "/", Nothing)
> >
> > I run the script and then i go to the report manager and the folder
> > created
> > is "and"
> > If i create the folder manually with the report manager it works OK, but i
> > need the script.
> >
> > Even when i print this name through the console:
> >
> > Console.WriteLine("�andú") ' Shows: and
> >
> > This prints fine in a common vb.net console application, someone knows
> > what
> > the problem ?
> >
> > Thanks in advance
> >
> >
>
>

Thursday, February 9, 2012

About building international applications in dotnet

Hi,

I am developing an application using C#.NET that accesses a remote database that that contains japanese characters.

My sample querry is strCommand = "SELECT * FROM table WHERE prodname = 'CR新海物語スペシャルM8'";

The result of querry displayed in the binded datagrid also contains other rows that has this prodname:

CRF湯けむり紀行SF-T
CRぱちんこハイサイVR1
CRホワイトエンジェルFS

etc.

Thanks in advance for your help.

You forgot to ask a question.
|||

Hi,

I am developing an application using C#.NET that accesses a remote database that that contains japanese characters.

My sample querry is strCommand = "SELECT * FROM table WHERE prodname = 'CR新海物語スペシャルM8'";

The result of the querry above that is displayed in the binded datagrid also contains other rows that has this prodname:

CRF湯けむり紀行SF-T
CRぱちんこハイサイVR1
CRホワイトエンジェルFS

etc.

Why does the command yields other records where the prodname field contains the 'CR' thing?

Sample querry result in a datagrid:

field1 field2 field3 prodname

a as er CR新海物語スペシャルM8

w aa ww CRF湯けむり紀行SF-T

ss dd ee CRぱちんこハイサイVR1

sdds ddd ee CR新海物語スペシャルM8

rf d5r wwe CRぱちんこハイサイVR1


Does this strange and redundant output has something to do with the Japanese characters contained in some fields

of the table?

Thanks in advance for your help.


|||Try with the correct nvarchar syntax:

SELECT * FROM table WHERE prodname = N'CR新海物語スペシャルM8'