Azure-Samples / azure-ai-vision-sdk

SDK for Microsoft's Azure AI Vision
MIT License
75 stars 46 forks source link

VisionSource.FromFile fails for special unicode characters #60

Closed andreasblueher closed 7 months ago

andreasblueher commented 7 months ago

Hello,

I'm not sure if this repo is a good place, but I couldn't find a better one.

This issue is for a: (mark with an x)

- [x] bug report -> please search issues before submitting
- [ ] feature request
- [ ] documentation issue or request
- [ ] regression (a behavior that used to work and stopped in a new release)

Minimal steps to reproduce

Try to load a file from disk using VisionSource.FromFile and a file name containing unicode characters like "zdjęcie wiertarko-wkrętarka.jpg"

Any log messages given by the failure

[Microsoft.AspNetCore.Diagnostics.DeveloperExceptionPageMiddleware] [UnhandledException] An unhandled exception has occurred while executing the request.System.ApplicationException: Exception with an error code: 0x73, message Exception with an error code: 0x73 (AZAC_ERR_FAILED_TO_OPEN_INPUT_FILE_FOR_READING) at Azure.AI.Common.Internal.Interop.ExceptionThrower.Throw(IntPtr hr) at Azure.AI.Common.Internal.Interop.VisionSource.CreateInternal(String optionName, String optionValue, String formatNamespace, IntPtr unsafeExtraHandle) at Azure.AI.Common.Internal.Interop.VisionSource.CreateFromOption(String optionName, String optionValue, String formatNamespace) at Azure.AI.Vision.Common.VisionSource.FromFile(String filePath)

Expected/desired behavior

VisionSource.FromFile should be able to work with unicode characters in filenames

Versions

Microsoft 0.15.1-beta.1

dargilco commented 7 months ago

@andreasblueher thank you for bringing this to our attention! We will look into it.

dargilco commented 7 months ago

Closing this issue as we track it internally.

dargilco commented 7 months ago

Internal work item number 5998508