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

Invalid encoding for project files for Visual Studio #3183

Closed
ghost opened this issue Oct 23, 2019 · 2 comments
Closed

Invalid encoding for project files for Visual Studio #3183

ghost opened this issue Oct 23, 2019 · 2 comments
Assignees
Milestone

Comments

@ghost
Copy link

ghost commented Oct 23, 2019

What kind of issue is this?

  • PlatformIO Core.
    If you’ve found a bug, please provide an information below.

Configuration

Operating system: Windows 10 x64

PlatformIO Version (platformio --version): 4.0.3

Description of problem

When generating project files for Visual Studio, PIO adds 6 bytes C3 AF C2 BB C2 BF at the beginning of platformio.vcxproj and platformio.vcxproj.filters files. These 6 bytes, if decoded as UTF-8, become characters , which look exactly like UTF-8 Byte Order Mark decoded using CP1252.
Trying to open the project file in Visual Studio 2019 as is gives the following error:
image
Removing these 6 bytes or replacing them with EF BB BF, a correct value for UTF-8 BOM, fixes it.

Steps to Reproduce

  1. mkdir test
  2. cd test
  3. platformio init --ide visualstudio -b uno

Actual Results

platformio.vcxproj (as UTF-8)

<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
  <PropertyGroup>
   ...

Expected Results

platformio.vcxproj (as UTF-8)

<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
  <PropertyGroup>
   ...

Additional info

Python 3.7.3
Visual Studio Community 16.3.6

@ivankravets
Copy link
Member

@valeros could you reproduce it?

@valeros
Copy link
Member

valeros commented Oct 25, 2019

Many thanks for reporting! Fixed in the development branch.

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

No branches or pull requests

2 participants