none
French Accent

    Question

  • Using MSDE 2000

     

    I made a script to create my database and insert default values in some tables. The problem is that all the accent are replace by junk ("UnitÚs instead of Unités"). But if I insert values with Server Explorer, ADO.Net or oSql it work fine...

     

    Anyone as an idea on why accent are replace by junk only when insertion are made by a script.

     

    Thanks

    Monday, May 28, 2007 5:40 PM

All replies

  • What is the collation and system locale when used this script?

    I think there used to be problem with French collation in SQL 2000, You either have to support all collations or force your clients to reinstall SQL Server with the collation you chose. It is not quite clear why French data in French_CI_AS collation and Latin1_General_CI_AS collation are incompatible.

    Monday, May 28, 2007 6:54 PM
  • I use the collation "SQL_Latin1_General_CP1_CI_AS". I also tried with the collation "French_CI_AS" but I had the same result.

    Monday, May 28, 2007 7:42 PM
  • I've just installed Sql Server 2005 Express and I have the same problem. So this is not a Sql Server 2000 issue.

     

    Here's a part of the database creation script:

     

    Code Snippet

    -- SQL Manager 2005 Lite for SQL Server (2.4.0.1)
    -- ---------------------------------------
    -- Host      : MyHost
    -- Database  : MyDatabase
    -- Version:  : Microsoft SQL Server  9.00.1399.06

    DROP DATABASE MyDatabase
    GO

    CREATE DATABASE [MyDatabase]
    COLLATE SQL_Latin1_General_CP1_CI_AS
    GO

    USE [MyDatabase]
    GO

    --
    -- Structure for table Langues :
    --

    CREATE TABLE [dbo].[Langues] (
      [id] int NOT NULL,
      [langue] varchar(2) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL,
      [description] varchar(100) COLLATE SQL_Latin1_General_CP1_CI_AS NULL
    )
    ON [PRIMARY]
    GO

    --
    -- Data for table Langues  (LIMIT 0,500)
    --

    INSERT INTO [dbo].[Langues] ([id], [langue], [description])
    VALUES
      (1, 'En', 'Rules')
    GO

    INSERT INTO [dbo].[Langues] ([id], [langue], [description])
    VALUES
      (1, 'Fr', 'Règlementations')
    GO

    INSERT INTO [dbo].[Langues] ([id], [langue], [description])
    VALUES
      (2, 'En', 'Repairs')
    GO

    INSERT INTO [dbo].[Langues] ([id], [langue], [description])
    VALUES
      (2, 'Fr', 'Réparations')
    GO


     

    ALTER TABLE [dbo].[Langues]
    ADD CONSTRAINT [PK_Langues]
    PRIMARY KEY CLUSTERED ([id], [langue])
    WITH (
      PAD_INDEX = OFF,
      IGNORE_DUP_KEY = OFF,
      STATISTICS_NORECOMPUTE = OFF,
      ALLOW_ROW_LOCKS = ON,
      ALLOW_PAGE_LOCKS = ON)
    ON [PRIMARY]
    GO

     

    -- END OF THE SCRIPT

     

     When I open server explorer to view the data I get

     

    - "RÚparations" instead of "Réparations"

    - "RÞglementations" instead of "Règlementations"

     

    I haven't figure out why so far...

     

    Thanks

    Wednesday, May 30, 2007 3:36 PM
  • I finally found the problem. It had nothing to do with sql server... my script file was save under the ANSI encoding instead of UNICODE. Dumb problem

     

    Thanks for your time.

    • Proposed as answer by jalekz Friday, September 02, 2011 4:31 PM
    Monday, June 04, 2007 3:55 PM