Traducir en SQL Server 2008, utilizando Bing Translate API.

Using the code examples given by Microsoft:

I have enabled translation in my SQL Server 2008 database. When the input string is relatively simple, without accented characters, translation works fine.

Example call (through Management Studio):

SELECT [dbo].[udfCallTranslator] ('Hej','sv','en')



The problem lies when there are special accented characters in the input:

SELECT [dbo].[udfCallTranslator] ('Biogasanläggningar','sv','en')



Debería regresar:

Biogas plants

If I give the input to Microsoft's web site ( it translates it correctly.

If i call the underlying dll function through a let's say Windows Form application, it also translates it correctly.

So, my guess is that something isn't passed correctly from Management Studio to the underlying function.

I tried changing the editor's font to Arial Unicode MS, but nothing changed.

Any other insight on what could be wrong?

preguntado el 28 de mayo de 14 a las 14:05

1 Respuestas

Esto debería ayudar.

SQL Server multi language data support

Have you made sure its in NVARCHAR as well as preceded all passed unicode strings with N?

SELECT [dbo].[udfCallTranslator] (N'Biogasanläggningar','sv','en')

contestado el 23 de mayo de 17 a las 11:05

No es la respuesta que estás buscando? Examinar otras preguntas etiquetadas or haz tu propia pregunta.