Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

183
Vistas
Arabic characters showing as garbage in .Net when getting data from Sybase

I am trying to display Arabic characters from Sybase database using .Net Windows Forms application but they appear as garbage. I am using ODBC.

If I use ADO.Net then characters are displayed fine so the problem is only in ODBC (and OlEDB which I have also tried)

I tried to user CharSet=UTF8 in ODBC connection string but I started getting error Invalid character conversion. Here's my connecting string:

<add name="SybaseString" connectionString="DSN=myDatabase;UID=sa;PWD=sa123;CharSet=utf8" />

While displaying I am not doing anything fancy, just directly displaying data like this reader["ArabicName"].ToString()

There is no issue with how data is stored in database because when using ADO.Net it works fine. How do I fix this issue?

over 4 years ago · Santiago Trujillo
1 Respuestas
Responde la pregunta

0

Ok using character set cp1256 in connection string fixed the issue. So final connection string would look like this:

<add name="SybaseString" connectionString="DSN=myDatabase;UID=sa;PWD=sa123;CharSet=cp1256" />

How I found out? First I ran this command sp_helpsort to find out character set used by the database. There I saw that the char set is cp1256 so I used the same and now it is working fine.

over 4 years ago · Santiago Trujillo Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda