Opened 13 years ago

Last modified 13 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 13 years ago.

Download all attachments as: .zip

Change History (9)

by Pedro Gea, 13 years ago

Attachment: test.xls​ added

comment:1 by Jorge, 13 years ago

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

comment:2 by Jorge, 13 years ago

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

comment:3 by Pedro Gea, 13 years ago

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 by Pedro Gea, 13 years ago

(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 by Pedro Gea, 13 years ago

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

comment:6 by Pedro Gea, 13 years ago

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

comment:7 by Jorge, 13 years ago

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

comment:8 by Jorge, 13 years ago

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

Note: See TracTickets for help on using tickets.