[go: nahoru, domu]

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

If the application path contains "Unicode characters" (for instance: ő) the SkiaSharp.dll cannot load native libSkiaSharp.dll. #2870

Open
1 task done
BadaPZ opened this issue May 27, 2024 · 1 comment
Labels

Comments

@BadaPZ
Copy link
BadaPZ commented May 27, 2024

Description

If the application path contains Unicode characters (ő) the SkiaSharp.dll cannot load native libSkiaSharp.dll.

The app is .NET fx 4.7.2 x64. NuGet version 2.88.8

Code

Just put a character like ő somewhere into the path and start the application

Expected Behavior

It should handle the library paths as Unicode strings, like CreateFileW does

Actual Behavior

Exception thrown

Version of SkiaSharp

2.88.3 (Current)

Last Known Good Version of SkiaSharp

Other (Please indicate in the description)

IDE / Editor

Visual Studio (Windows)

Platform / Operating System

Windows

Platform / Operating System Version

Win11 23H2 x64

Devices

PC

Relevant Screenshots

image
image

Relevant Log Output

No response

Code of Conduct

  • I agree to follow this project's Code of Conduct
@BadaPZ
Copy link
Author
BadaPZ commented May 28, 2024

Is there anything wrong with not having LoadLibraryW and CharSet = CharSet.Unicode implemented here?

	private static class Win32
	{
		private const string SystemLibrary = "Kernel32.dll";

		[DllImport (SystemLibrary, SetLastError = true, CharSet = CharSet.Ansi)]
		public static extern IntPtr LoadLibrary (string lpFileName);

		[DllImport (SystemLibrary, SetLastError = true, CharSet = CharSet.Ansi)]
		public static extern IntPtr GetProcAddress (IntPtr hModule, string lpProcName);

		[DllImport (SystemLibrary, SetLastError = true, CharSet = CharSet.Ansi)]
		public static extern void FreeLibrary (IntPtr hModule);
	}

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

No branches or pull requests

1 participant