close Warning: Can't synchronize with repository "(default)" (/var/svn/tolp does not appear to be a Subversion repository.). Look in the Trac log for more information.

Opened 12 years ago

Last modified 12 years ago

#1725 new defect

TolExcel no lee el carácter €

Reported by: Manuel Locubiche Malaxechevarria Owned by: Pedro Gea
Priority: high Milestone: Mantainance
Component: TolPackage Version: 3.1
Severity: critical Keywords:
Cc:

Description

TolExcel no lee el carácter "€".

Por ejemplo:

#Require TolExcel;
Real id = TolExcel::CppTools::Open("test.xls");
Real TolExcel::CppTools::ActivateNamedWS(id, "Hoja1");
Set ws = TolExcel::CppTools::ReadRange(id, [[1,1]], [[3,3]]);
Real TextLength(ws[2][2]); // => 0

Attachments (1)

test.xls (17.0 KB) - added by Pedro Gea 12 years ago.

Download all attachments as: .zip

Change History (9)

Changed 12 years ago by Pedro Gea

Attachment: test.xls added

comment:1 Changed 12 years ago by Jorge

(In [5999]) refs #1725, celdas con contenido WSTRING no estaban siendo tratadas, pendiente compilar y probar en windows

comment:2 Changed 12 years ago by Jorge

(In [6000]) refs #1725, test code

comment:3 Changed 12 years ago by Pedro Gea

En Windows sigue sin funcionar bien, cuando aparece un caracter especial se interrumpe la cadena.

Por ejemplo, si el contenido de la celda fuese: "42€3 £ zž /ʒ/ sss" obtendríamos "42".

Lo más parecido que he conseguido es: "42¬3 £ z~ /’/ sss" usando:

case BasicExcelCell::WSTRING:
  {
  const wchar_t * u_string = cell->GetWString();
  std::wstring w3(u_string);
  std::string s3(w3.begin(), w3.end());
  result = new BContensText(s3.c_str());
  }
  break;

comment:4 Changed 12 years ago by Pedro Gea

(In [6003]) Refs #1725
Se soluciona la situación en Windows utilizando la función WideCharToMultiByte y la página de códigos usada por Windows con el Latin1 extendido.

comment:5 Changed 12 years ago by Pedro Gea

(In [6004]) Refs #1725
Se actualizan las dll

comment:6 Changed 12 years ago by Pedro Gea

(In [6005]) Refs #1725
Se actualiza el ejemplo de test con un símbolo de €.

comment:7 Changed 12 years ago by Jorge

(In [6006]) refs #1725, se implementa la solución equivalente en Linux

comment:8 Changed 12 years ago by Jorge

(In [6007]) refs #1725, actualizamos la .so de linux

Note: See TracTickets for help on using tickets.