BIFF5 Encoding #2113

Open
opened 2020-09-21 18:24:39 +00:00 by SheetJSDev · 2 comments
SheetJSDev commented 2020-09-21 18:24:39 +00:00 (Migrated from github.com)

Hello
I have the same issue for the encoding.
XLS BIFF8(office 97-2004 document) and contains japanese characters.
So i have used codepage:932 for japanese and it's working well for csv files.
Unfortunately, it's not working for office 97 xls file.
Manually, i open office 97 xls file and save as xlsx or csv file and one alert prompted as like that:
"Some features in your workbook must be lost if you save it as Microsoft Excel 5.0/95 Workbook.
Do you want to keep using that format?"
After i click "Yes" and save, then it's working without any problem.(of course we use codepage: 932)
Could you please give me instruction how can i solve that issue?
Thanks.

Originally posted by @WangHwaKok in https://github.com/SheetJS/sheetjs/issues/739#issuecomment-695789350

Hello I have the same issue for the encoding. XLS BIFF8(office 97-2004 document) and contains japanese characters. So i have used codepage:932 for japanese and it's working well for csv files. Unfortunately, it's not working for office 97 xls file. Manually, i open office 97 xls file and save as xlsx or csv file and one alert prompted as like that: "Some features in your workbook must be lost if you save it as Microsoft Excel 5.0/95 Workbook. Do you want to keep using that format?" After i click "Yes" and save, then it's working without any problem.(of course we use codepage: 932) Could you please give me instruction how can i solve that issue? Thanks. _Originally posted by @WangHwaKok in https://github.com/SheetJS/sheetjs/issues/739#issuecomment-695789350_
SheetJSDev commented 2020-09-21 18:48:31 +00:00 (Migrated from github.com)

@WangHwaKok we can continue the discussion here.

The offending file has a CodePage record with value 1252, which suggests it should be using Windows-1252.

There are two settings in Windows for controlling region features (using Windows 7 nomenclature):

  • "Formats": This controls how date/time formats and other fields are interpreted

  • "Language for non-Unicode programs": This governs the system locale (verified with CHCP)

Format Language Result
English US English US CP1252
Japanese English US CP932
English US Japanese Error
Japanese Japanese CP932

Error: One or more worksheets in this workbook have names that contain square brackets [], but when you allow Excel to repair the result looks like CP932

@WangHwaKok we can continue the discussion here. The offending file has a CodePage record with value 1252, which suggests it should be using Windows-1252. There are two settings in Windows for controlling region features (using Windows 7 nomenclature): - "Formats": This controls how date/time formats and other fields are interpreted - "Language for non-Unicode programs": This governs the system locale (verified with CHCP) | Format | Language | Result | |-|-|-| | English US | English US | CP1252 | | Japanese | English US | CP932 | | English US | Japanese | Error | | Japanese | Japanese | CP932 | Error: One or more worksheets in this workbook have names that contain square brackets [], but when you allow Excel to repair the result looks like CP932
happy-ruby commented 2020-09-21 22:51:11 +00:00 (Migrated from github.com)

Hello @SheetJSDev
Yes, very strange file and but it's a downloaded file.
I tried to convert it to xlsx or csv using free online converting services, finally it works.
I recognize that it is not the converting issue and converting fails using this library because of encoding issue.
However, still i am looking for the solution...

Hello @SheetJSDev Yes, very strange file and but it's a downloaded file. I tried to convert it to xlsx or csv using free online converting services, finally it works. I recognize that it is not the converting issue and converting fails using this library because of encoding issue. However, still i am looking for the solution...
Sign in to join this conversation.
No Milestone
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: sheetjs/sheetjs#2113
No description provided.