Invalid data in monthly cost data export

Erik Post 70 Reputation points
2023-05-26T11:56:58.9066667+00:00

Hello,

Maybe someone here can help me out. I'm generating a monthly cost export via the Export function in Cost Management in Azure Portal. This export generates a CSV containing last month's cost data.

The file is in UTF-8 format, which is good. This can be verified by the fact that the file starts with the U+FEFF character, which is EF BB BF encoded in UTF-8 bytes.

However, this same character (and UTF-8 encoded bytes) is present at the start of the first row of data (ie second line of the file).

This has the effect that the first invoice ID in the file becomes invalid: 11 characters and starting with a for users invisible ZERO WIDTH NON-BREAK SPACE.

Is this a bug in the Cost Export functionality, or is there some setting I need to change? I asked Microsoft Azure Support but they are blaming it on the tooling I'm using to process the CSV.

Azure Cost Management
Azure Cost Management
A Microsoft offering that enables tracking of cloud usage and expenditures for Azure and other cloud providers.
1,991 questions
0 comments No comments
{count} votes

Accepted answer
  1. SadiqhAhmed-MSFT 36,881 Reputation points Microsoft Employee
    2023-05-31T09:55:22.04+00:00

    Hello @Erik Post Thank you for your post and I apologize for the delayed response.

    The characters (ZERO WIDTH NON-BREAK SPACE ) you see at the beginning of the file are BOM characters. Although BOM characters are not required for UTF-8 encoding, the exported CSV files has them to aid interoperability with tools such as Excel etc. This is by design. 

    If you want to get rid of BOM characters, you can open the file in Notepad and save it as UTF-8 only. Notepad supports saving text files in both UTF-8 and UTF-8 with BOM.  Excel requires CSV files to have the BOM character to be able to open it.
    User's image

    Update:

    @Erik Post The fix has been deployed across all the regions. I suggest you try and please confirm if you are able to see the success with fix to BOM characters issue.

    Please write back to us if you have any concerns in this matter!


    If the response helped, do "Accept Answer" and up-vote it

    1 person found this answer helpful.

0 additional answers

Sort by: Most helpful