Traducir en SQL Server 2008, utilizando Bing Translate API.
Frecuentes
Visto 1,687 equipos
1
Using the code examples given by Microsoft:
http://gallery.technet.microsoft.com/Language-Translation-e3898f0a
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')
Devoluciones:
Hi
The problem lies when there are special accented characters in the input:
SELECT [dbo].[udfCallTranslator] ('Biogasanläggningar','sv','en')
Devoluciones:
Biogasanlaggningar
Debería regresar:
Biogas plants
If I give the input to Microsoft's web site (https://datamarket.azure.com/dataset/bing/microsofttranslator) 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?
1 Respuestas
1
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 sql-server-2008 ssms sqlclr bing-api or haz tu propia pregunta.