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

Convert "UTF-16 LE" to "UTF-8" and vice-versa #4

Open
vonBarbarosa opened this issue Jan 20, 2021 · 2 comments
Open

Convert "UTF-16 LE" to "UTF-8" and vice-versa #4

vonBarbarosa opened this issue Jan 20, 2021 · 2 comments
Labels
enhancement New feature or request

Comments

@vonBarbarosa
Copy link
Owner

Many files inside pbit zipped directory (i.e. Connections, DataModelSchema, DiagramLayout, DiagramState, Metadata, Settings, Version, Report/Layout, Report/LinguisticSchema) are json files enconded with UTF-16 LE. This makes it difficult for versioning repos to diff them.

The Power BI desktop software needs those file to be encoded like this to work.

This way, it's a nice feature to convert those files to UTF-8 on pre-commit, and convert them back to UTF-16 LE on post-commit and post-checkout.

@vonBarbarosa vonBarbarosa added the enhancement New feature or request label Jan 20, 2021
@vonBarbarosa
Copy link
Owner Author

Any suggestions on how to make this, even if you don't submit any PR, are welcome :)

@vonBarbarosa
Copy link
Owner Author

What I have already tried:

I could do it with iconv, but I had some problems because I formatted the json files with jq, and when I formatted back, Power BI didn't recognize the pbit file.

Probably using iconv to convert back and forth will solve it, and working with jq will be another step on another enhancement

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

No branches or pull requests

1 participant