Skip to content
This repository has been archived by the owner on Jan 17, 2024. It is now read-only.

Wide characters #111

Closed
hacker1024 opened this issue Jun 28, 2021 · 2 comments
Closed

Wide characters #111

hacker1024 opened this issue Jun 28, 2021 · 2 comments

Comments

@hacker1024
Copy link

I need to decode wide character (wchar_t) strings. The size of wchar_t can vary between platforms; on Windows, for example, it's 2 bytes (UTF-16) , but on macOS, it's 4 (UTF-32).

At the moment, there's no easy way to decode these characters properly. It's be great if something like a WChar type was created, and there was a function on Pointer<WChar> to generate a string.

@dcharkes
Copy link
Contributor

This is tracked in dart-lang/sdk#42563.

@hacker1024
Copy link
Author

dart-lang/sdk#42563 covers the wchar_t type representation in Dart, but once this is resolved, a utility function to handle string conversions should still be implemented in package:ffi. Can this issue stay open?

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

No branches or pull requests

2 participants