Ver Mensaje Individual
  #2 (permalink)  
Antiguo 25/09/2008, 03:45
Avatar de PosProdukcion
PosProdukcion
 
Fecha de Ingreso: noviembre-2004
Ubicación: Manzanares el Real (Madrid)
Mensajes: 726
Antigüedad: 20 años, 5 meses
Puntos: 9
Respuesta: Asp + ajax + utf8

Por probar, prueba también esta: <%@ Language=VBScript Codepage=1252 %> , a mi me solucipnó el mismo problema (sin Ajax, solo ASP).

¿En la BD los campos son varchar() o nvarchar()? S son UTF-8 deberían ser nvarchar(), que es unicode.

Y si tienes un servidor o hosting, prueba también en el servidor, a mi este tipo de problemas me ocurren solo en local, no en remoto (ya te digo, que yo lo solucioné con el Codepage=1252.

Si no... siempre puedes ir a la solución drástica:

Código asp:
Ver original
  1. Function quitaTildes(texto)
  2.         If not EsNulo(texto) Then
  3.             texto = Replace(texto, "¡", "", 1, Len(texto), 1)
  4.             texto = Replace(texto, "¿", "", 1, Len(texto), 1)
  5.             texto = Replace(texto, "'", "", 1, Len(texto), 1)
  6.  
  7.             Texto = Replace(Texto, "á", "a", 1, Len(Texto), 1)
  8.             Texto = Replace(Texto, "é", "e", 1, Len(Texto), 1)
  9.             Texto = Replace(Texto, "í", "i", 1, Len(Texto), 1)
  10.             Texto = Replace(Texto, "ó", "o", 1, Len(Texto), 1)
  11.             Texto = Replace(Texto, "ú", "u", 1, Len(Texto), 1)
  12.             Texto = Replace(Texto, "ñ", "n", 1, Len(Texto), 1)
  13.             texto = Replace(texto, "ç", "c", 1, Len(texto), 1)
  14.  
  15.             texto = Replace(texto, "Á", "A", 1, Len(texto), 1)
  16.             texto = Replace(texto, "É", "E", 1, Len(texto), 1)
  17.             texto = Replace(texto, "Í", "I", 1, Len(texto), 1)
  18.             texto = Replace(texto, "Ó", "O", 1, Len(texto), 1)
  19.             texto = Replace(texto, "Ú", "U", 1, Len(texto), 1)
  20.             texto = Replace(texto, "Ñ", "N", 1, Len(texto), 1)
  21.             texto = Replace(texto, "Ç", "C", 1, Len(texto), 1)
  22.  
  23.             texto = Replace(texto, "à", "a", 1, Len(Texto), 1)
  24.             texto = Replace(texto, "è", "e", 1, Len(Texto), 1)
  25.             texto = Replace(texto, "ì", "i", 1, Len(Texto), 1)
  26.             texto = Replace(texto, "ò", "o", 1, Len(Texto), 1)
  27.             texto = Replace(texto, "ù", "u", 1, Len(Texto), 1)
  28.                                        
  29.             texto = Replace(texto, "À",  "A", 1, Len(texto), 1)
  30.             texto = Replace(texto, "È",  "E", 1, Len(texto), 1)
  31.             texto = Replace(texto, "Ì",  "I", 1, Len(texto), 1)
  32.             texto = Replace(texto, "Ò",  "O", 1, Len(texto), 1)
  33.             texto = Replace(texto, "Ù",  "U", 1, Len(texto), 1)
  34.  
  35.             texto = Replace(texto, "ä", "a", 1, Len(Texto), 1)
  36.             texto = Replace(texto, "ë", "e", 1, Len(Texto), 1)
  37.             texto = Replace(texto, "ï", "i", 1, Len(Texto), 1)
  38.             texto = Replace(texto, "ö", "o", 1, Len(Texto), 1)
  39.             texto = Replace(texto, "ü", "u", 1, Len(Texto), 1)
  40.  
  41.             texto = Replace(texto, "Ä",  "A", 1, Len(texto), 1)
  42.             texto = Replace(texto, "Ë",  "E", 1, Len(texto), 1)
  43.             texto = Replace(texto, "Ï",  "I", 1, Len(texto), 1)
  44.             texto = Replace(texto, "Ö",  "O", 1, Len(texto), 1)
  45.             texto = Replace(texto, "Ü",  "U", 1, Len(texto), 1)
  46.  
  47.             texto = Replace(texto, "â", "a", 1, Len(Texto), 1)
  48.             texto = Replace(texto, "ê", "e", 1, Len(Texto), 1)
  49.             texto = Replace(texto, "î", "i", 1, Len(Texto), 1)
  50.             texto = Replace(texto, "ô", "o", 1, Len(Texto), 1)
  51.             texto = Replace(texto, "û", "u", 1, Len(Texto), 1)
  52.  
  53.             texto = Replace(texto, "Â",  "A", 1, Len(texto), 1)
  54.             texto = Replace(texto, "Ê",  "E", 1, Len(texto), 1)
  55.             texto = Replace(texto, "Î",  "I", 1, Len(texto), 1)
  56.             texto = Replace(texto, "Ô",  "O", 1, Len(texto), 1)
  57.             texto = Replace(texto, "Û",  "U", 1, Len(texto), 1)
  58.        Else
  59.             texto = ""
  60.         End If
  61.         quitaTildes = texto
  62.     End Function