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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

馃悶 VSTPlugin.name encoded in UTF8 #150

Closed
1 task done
smolio opened this issue May 24, 2023 · 2 comments
Closed
1 task done

馃悶 VSTPlugin.name encoded in UTF8 #150

smolio opened this issue May 24, 2023 · 2 comments
Assignees
Labels
bug Something isn't working plugin-3rdparty VST 2/3, Waves, AU plugins and Fruity Wrapper
Milestone

Comments

@smolio
Copy link

smolio commented May 24, 2023

Describe the issue

This decoding error popped up while iterating through the channels of a project file for all instrument plugin names

Exception has occurred: UnicodeDecodeError
'ascii' codec can't decode byte 0xc2 in position 12: ordinal not in range(128)
  File "D:\Users\Beyonca\CodingProjects\Python\FLP-Analyzer\test_file.py", line 15, in <module>
    plg = channel.plugin.name #Error occurs here
          ^^^^^^^^^^^^^^^^^^^
UnicodeDecodeError: 'ascii' codec can't decode byte 0xc2 in position 12: ordinal not in range(128)

The VST name that appears to be causing the error has a squared 2 in its name (don't ask me why)
VST_Name

I recreated a new project file isolating it to only this plugin to confirm.

What version of PyFLP are you using?

2.1.0

What code caused this issue?

import pyflp
import os

#Getting relative file path
abs_path = os.path.dirname(__file__)
rel_path = "proj_files/nonASCIIcharacters_in_VST.flp"
proj_file_path = os.path.join(abs_path, rel_path)

#Load the flp project file
proj = pyflp.parse(proj_file_path)

#Get the name of each plugin in proj file
for channel in iter(proj.channels.instruments):
    plg = channel.plugin.name #Error occurs here
    print(plg)

Screenshots, Additional info

The error screenshot
Error

The flp project
nonASCIIcharacters_in_VST.zip

Code of Conduct

  • I agree to follow this project's Code of Conduct
@smolio smolio added the bug Something isn't working label May 24, 2023
@demberto demberto self-assigned this May 24, 2023
@demberto demberto added the plugin-3rdparty VST 2/3, Waves, AU plugins and Fruity Wrapper label May 24, 2023
@demberto demberto added this to the 2.1.1 milestone May 24, 2023
@demberto
Copy link
Owner

demberto commented May 24, 2023

This is a discovery. Till now, I believed FL didn't allow non-ASCII characters as part of the plugin's factory name as the VST2 (and till some time VST3) didn't allow them (technically). The encoded string (in CP-1252) is

shortcircuit脗虏

which in UTF8 becomes

shortcircuit虏

A fix will be out soon.

@demberto demberto changed the title 馃悶 Can't read non-ASCII characters in VSTPlugin name 馃悶 VSTPlugin.name encoded in UTF8 May 24, 2023
@demberto
Copy link
Owner

@smolio Issue has been fixed in v2.1.1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working plugin-3rdparty VST 2/3, Waves, AU plugins and Fruity Wrapper
Projects
None yet
Development

No branches or pull requests

2 participants