Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Text encoding [Chinese] and Section Size limit #2

Open
jfkjfj opened this issue Sep 9, 2020 · 2 comments
Open

Text encoding [Chinese] and Section Size limit #2

jfkjfj opened this issue Sep 9, 2020 · 2 comments

Comments

@jfkjfj
Copy link

jfkjfj commented Sep 9, 2020

Hi,

first of all thanks a lot for sharing pylabview with us.
I am facing two issues while trying to reverse engineer a LabView exe to LabView project:

  1. The origin of the exe is a Windows PC with Chinese region settings. If I unzip the filenames are unreadable, because the text encoding is wrong. I am using Ubuntu 20.04 (and tried both German and Chinese region settings). I also used the -t parameter of readRSRC.py (both 'gbk' and 'cp950'). No success. Because there are over 800 files I cannot modify the file names manually (and I didn’t know which file is the right). Do you have an idea what might be the issue?

  2. Using the readRSRC file I get some error messages shown below. Do you have the idea how to increase the mentioned section size?

…/pylabview$ ./readRSRC.py -vv -x -t gbk -i ''
: Starting file parse for RSRC extraction
: Block 'FLAG' index 0 recognized
: Block 'STRsh' index 1 recognized
: Block 'LVzp' index 2 recognized
: Block b'FLAG' max data size set to 32 bytes
: Block b'STR#' max data size set to 604 bytes
: Warning: Block b'STR#' section 25000 parse exception: Section size (604) too small to store 3584 strings.
: Warning: Block b'STR#' section 25000 size is 548 and does not match parsed size 2
: Block b'LVzp' max data size set to 30838920 bytes
: Writing block b'FLAG'
: Writing inline XML for block b'FLAG' section 1500
: Writing inline XML for block b'FLAG' section 1501
: Writing inline XML for block b'FLAG' section 1502
: Writing inline XML for block b'FLAG' section 1550
: Writing block b'STR#'
: Storing block b'STR#' section 25000 binary in _STRsh25000.bin'
: Writing inline XML for block b'STR#' section 25001
: Writing block b'LVzp'
: Storing block b'LVzp' section 0 binary in '_LVzp.bin'
: Writing binding XML

@mefistotelis
Copy link
Owner

mefistotelis commented Sep 9, 2020

  1. You seem to have an issue with unzip, not with pylabview. pylabview does not influence file names in ZIP file. You need to change them when unzipping.

And if you misspoke, and the issue is in fact with LLB files extracted by pylabview - well, I never seen any VI file from Linux with national chars. I tested pylabview only on national version of Windows. Though all modern versions of Linux use UTF-8 to store strings. Try that.

  1. This in not an error, but warning. pylabview noticed the parsing method it tried seem to produce invalid output, so it left the section in BIN form, without parsing. This isn't very unusual, as Labview uses some FourCC codes (ie. STR#) for storing data in multiple formats. When pylabview doesn't understand the format, it leaves the section as BIN file.

@jfkjfj
Copy link
Author

jfkjfj commented Sep 9, 2020

  1. Thank you! You were totally right, the problem was caused by the unzipping.
  2. Okay, thank you for clarifying!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants