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

[Windows] Cant recording when path contains CJK character #422

Closed
ZhuJHua opened this issue Oct 27, 2024 · 2 comments
Closed

[Windows] Cant recording when path contains CJK character #422

ZhuJHua opened this issue Oct 27, 2024 · 2 comments

Comments

@ZhuJHua
Copy link

ZhuJHua commented Oct 27, 2024

Package version
record: 5.1.2

Environment

  • OS: Windows

Describe the bug

Cant recording on windows, I used the path_provider package to get the cache directory of the application.The path contains a username which is a CJK character like C:\Users\住京华\AppData\Local\cn.yooss\mood_diary\audio-0192ce6d-ad7c-7386-9ac5-69adf5557f64.m4a. Then recording threw this exception after calling the start method.
image

However, when using a latin only path, it works well.

My Code
This is my code

state.fileName = 'audio-${const Uuid().v7()}.m4a';
await audioRecorder.start(
          const RecordConfig(androidConfig: AndroidRecordConfig(muteAudio: true, useLegacy: true)),
          path: Utils().fileUtil.getCachePath(state.fileName));

The getCachePath() method is just used the getApplicationCacheDirectory() method in path_provider package.

It work well on Android devices, but not windows.

@llfbandit
Copy link
Owner

Thanks for the report. This should be fixed with the corresponding commit but I can't test it myself.
So feedback is very welcome!

@ZhuJHua
Copy link
Author

ZhuJHua commented Nov 1, 2024

It works fine as you can publish it into pub, thanks a lot!🥰

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

No branches or pull requests

2 participants