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

Compiler warning due to Unicode characters #1087

Closed
TiejunMS opened this issue Aug 20, 2020 · 2 comments · Fixed by #1196
Closed

Compiler warning due to Unicode characters #1087

TiejunMS opened this issue Aug 20, 2020 · 2 comments · Fixed by #1196
Assignees
Labels
Azure.Core bug This issue requires a change to an existing behavior in the product in order to be resolved. Client This issue points to a problem in the data-plane of the library. customer-reported Issues that are reported by GitHub users external to the Azure organization.

Comments

@TiejunMS
Copy link

Describe the bug
In file sdk\src\azure\core\az_http_header_validation_private.h, there are Unicode characters. In non English environment, the compiler will give warnings.

warning C4819: The file contains a character that cannot
be represented in the current code page (936). Save the file in Unicode format to prevent data loss (compiling source file C:\azure-sdk-for-c\sdk\src\azure\core\az_http_request.c) [C:\build\sdk_core\sdk\src\azure\core\az_core.vcxproj]

Check the file format in Linux, it shows,

file az_http_header_validation_private.h
az_http_header_validation_private.h: C source, UTF-8 Unicode text

To Reproduce
Compile the project in non English environment.

Screenshots
Reopen file with GBK encoding.
image

Setup (please complete the following information):

  • OS: Win10
  • IDE: VS2019
  • Version of the Library used: 1.0.0-preview 4
@ghost ghost added needs-triage Workflow: This is a new issue that needs to be triaged to the appropriate team. customer-reported Issues that are reported by GitHub users external to the Azure organization. question The issue doesn't require a change to the product in order to be resolved. Most issues start as that labels Aug 20, 2020
@ahsonkhan
Copy link
Member

cc @vhvb1989

@ahsonkhan ahsonkhan added Azure.Core Client This issue points to a problem in the data-plane of the library. and removed needs-triage Workflow: This is a new issue that needs to be triaged to the appropriate team. question The issue doesn't require a change to the product in order to be resolved. Most issues start as that labels Aug 20, 2020
@ahsonkhan ahsonkhan added this to the [2020] September milestone Aug 20, 2020
@ahsonkhan ahsonkhan added the help wanted This issue is tracking work for which community contributions would be welcomed and appreciated label Aug 20, 2020
@RickWinter RickWinter added bug This issue requires a change to an existing behavior in the product in order to be resolved. and removed help wanted This issue is tracking work for which community contributions would be welcomed and appreciated labels Aug 24, 2020
@ahsonkhan
Copy link
Member

ahsonkhan commented Aug 24, 2020

@vhvb1989 Look at the hex dump. Instead of seeing hex 20 for space after device, we see c2 a0, which is a non-break space.

Updating the comments to use regular ASCII space should fix part of the issue.

Use: https://www.fileformat.info/tool/hexdump.htm

0000-04e0:  2f 20 31 39-20 2d 3e 20-20 64 65 76-69 63 65 c2  /.19.->. .device.
0000-04f0:  a0 63 6f 6e-74 72 6f 6c-c2 a0 33 0d-0a 20 20 30  .control ..3....0
0000-0500:  2c 20 2f 2f-20 32 30 20-2d 3e 20 20-64 65 76 69  ,.//.20. ->..devi

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Azure.Core bug This issue requires a change to an existing behavior in the product in order to be resolved. Client This issue points to a problem in the data-plane of the library. customer-reported Issues that are reported by GitHub users external to the Azure organization.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants