Club Delphi  
    FTP   CCD     Buscar   Trucos   Trabajo   Foros

Retroceder   Foros Club Delphi > Principal > Varios
Registrarse FAQ Miembros Calendario Guía de estilo Temas de Hoy

Grupo de Teaming del ClubDelphi

 
 
Herramientas Buscar en Tema Desplegado
  #3  
Antiguo 25-03-2010
Avatar de Softweb
Softweb Softweb is offline
Miembro
 
Registrado: ago 2008
Posts: 46
Poder: 0
Softweb Va por buen camino
Cita:
Empezado por yapt Ver Mensaje
Seguro que ya has probado esto, pero en Delphi 2010, a mí me funciona bien.
Código Delphi [-]var a : AnsiString; s : WideString; begin s := 'Avión'; a := AnsiString(s); end;


De hecho también funcionaría así:

Código Delphi [-] s := 'Avión'; a := s;


No sé... si tienes alguna pista más....

Saludos.
Gracias yapt por responder, ya lo e solucionado gracias a una pista sobre la función MultiByteToWideChar, e creado una función para la conversión.

Código Delphi [-]
function UTF8ToWideString(const S: AnsiString): WideString;
var
  BufSize: Integer;
begin
  Result := '';
  if Length(S) = 0 then Exit;
  BufSize := MultiByteToWideChar(CP_UTF8, 0, PAnsiChar(S), Length(S), nil, 0);
  SetLength(result, BufSize);
  MultiByteToWideChar(CP_UTF8, 0, PANsiChar(S), Length(S), PWideChar(Result), BufSize);
end;

Saludos y gracias por responder
Responder Con Cita
 



Normas de Publicación
no Puedes crear nuevos temas
no Puedes responder a temas
no Puedes adjuntar archivos
no Puedes editar tus mensajes

El código vB está habilitado
Las caritas están habilitado
Código [IMG] está habilitado
Código HTML está deshabilitado
Saltar a Foro

Temas Similares
Tema Autor Foro Respuestas Último mensaje
Cambiar CHARACTER SET NONE a UTF8 en FIREBIRD 1.5 ASAPLTDA Firebird e Interbase 1 06-03-2008 00:22:54
Codificar texto en UTF8 xio Internet 0 29-10-2007 18:10:19
La maldición de Vilas Delphius La Taberna 2 14-03-2007 03:39:32
La maldición del oráculo dec Debates 1 07-02-2006 07:27:38
La maldicion del 1521... Xianto Oracle 2 18-08-2005 15:26:24


La franja horaria es GMT +2. Ahora son las 11:29:38.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Traducción al castellano por el equipo de moderadores del Club Delphi
Copyright 1996-2007 Club Delphi