Repository navigation
Fix codepage conversion issues - #12115
Conversation
|
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository UI (base), Organization UI (inherited) Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (35)
📝 WalkthroughWalkthroughThe changes replace implicit string conversions with explicit UTF-8 and wxWidgets conversion helpers across plugin, media, audio, cloud, effect, UI, metadata, export, and project flows. The project recovery path now preserves temporary-project and connection filename state when no document is loaded. New parameterized tests cover autosave states and unavailable temporary directories. Estimated code review effort: 3 (Moderate) | ~25 minutes Merge Risk: 🔵 Low · up to Cancelling recovery can leave the previously open permanent project displayed as untitled. The correction is localized but should be applied before merging. 🚥 Pre-merge checks | ✅ 4✅ Passed checks (4 passed)
✨ Finishing Touches 💡 1🛠️ Fix failing CI checks 💡
Warning Linked repositories: Public OSS repositories can only analyze public repositories installed in this organization. No linked repositories were analyzed; skipped Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
6814a13 to
093a05c
Compare
There was a problem hiding this comment.
Actionable comments posted: 1
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI (base), Organization UI (inherited)
Review profile: CHILL
Plan: Advanced
Run ID: 3a365c26-5051-46af-820d-cc33f6ad13f9
📥 Commits
Reviewing files that changed from the base of the PR and between 6814a133eaeea671b5c4f6f194cd4b0720d7dcf1 and 093a05c.
📒 Files selected for processing (32)
au3/libraries/au3-vst3/VST3EffectBase.cppau3/libraries/au3-vst3/VST3EffectsModule.cppau3/libraries/au3-vst3/VST3Utils.cppau3/modules/import-export/mod-ffmpeg/lib-ffmpeg-support/wrappers/AVFormatContextWrapper.cppsrc/au3audio/internal/au3audiodrivercontroller.cppsrc/au3audio/internal/au3audioengine.cppsrc/au3cloud/internal/au3audiocomservice.cppsrc/au3cloud/internal/au3cloudservice.cppsrc/au3wrap/internal/au3commonsettings.cppsrc/au3wrap/internal/au3project.cppsrc/effects/effects_base/effectsmodule.cppsrc/effects/effects_base/internal/abstractviewlauncher.cppsrc/effects/effects_base/internal/au3/au3audiopluginmetareader.cppsrc/effects/effects_base/internal/au3effectloader.cppsrc/effects/effects_base/internal/effectconfigsettings.cppsrc/effects/effects_base/internal/effectexecutionscenario.cppsrc/effects/effects_base/internal/effectpresetsprovider.cppsrc/effects/effects_base/internal/effectpresetsscenario.cppsrc/effects/effects_base/internal/effectsactionscontroller.cppsrc/effects/effects_base/internal/effectsprovider.cppsrc/effects/effects_base/internal/missingeffectchecker.cppsrc/effects/effects_base/internal/realtimeeffectservice.cppsrc/effects/effects_base/view/effectpresetsbarmodel.cppsrc/effects/effects_base/view/effectsavecontextmenu.cppsrc/effects/effects_base/view/realtimeeffectviewerdialogmodel.cppsrc/effects/nyquist/internal/nyquistparameterextractorservice.cppsrc/importexport/export/internal/au3/au3exporter.cppsrc/importexport/export/internal/au3/au3ffmpegoptionsaccessor.cppsrc/project/internal/au3/au3metadata.cppsrc/projectscene/view/trackspanel/realtimeeffectlistitemmenumodel.cppsrc/projectscene/view/trackspanel/realtimeeffectlistitemmodel.cppsrc/trackedit/internal/au3/au3projecthistory.cpp
🚧 Files skipped from review as they are similar to previous changes (3)
- src/importexport/export/internal/au3/au3exporter.cpp
- src/au3audio/internal/au3audiodrivercontroller.cpp
- src/effects/effects_base/view/effectpresetsbarmodel.cpp
Included review availability: Your plan provides up to 10 included reviews per hour; 8 remain after this review.
| PluginPath VST3EffectBase::GetPath() const | ||
| { | ||
| return VST3Utils::MakePluginPathString({ mModule->getPath() }, mEffectClassInfo->ID().toString()); | ||
| return VST3Utils::MakePluginPathString(wxString::FromUTF8(mModule->getPath()), mEffectClassInfo->ID().toString()); |
There was a problem hiding this comment.
🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win
🔎 Supported by static analysis
🏁 Script executed:
sed -n '1,90p' au3/libraries/au3-vst3/VST3EffectBase.cpp
sed -n '55,85p' au3/libraries/au3-vst3/VST3Utils.cpp
rg -n "MakePluginPathString" au3/libraries/au3-vst3Repository: audacity/audacity
Length of output: 3779
🏁 Script executed:
set -eu
printf '%s\n' '--- wxWidgets version/config references ---'
rg -n --glob '!build/**' --glob '!node_modules/**' 'wxWidgets|wxString::FromUTF8|FromUTF8[[:space:]]*\(' au3 CMakeLists.txt cmake 2>/dev/null | head -200
printf '%s\n' '--- candidate wxString declarations ---'
rg -n --glob '*wxString*' --glob '*.h' --glob '*.hpp' 'FromUTF8' . 2>/dev/null | head -100Repository: audacity/audacity
Length of output: 25341
🌐 Web query:
wxWidgets wxString FromUTF8 overload documentation wxString argument
💡 Result:
<search_synthesis>
The static method wxString::FromUTF8 is used to create a wxString object from a UTF-8 encoded string [1][2]. As of the current versions of wxWidgets, it provides the following overloads: 1. static wxString FromUTF8(const char *s) Converts a null-terminated UTF-8 C string to a wxString [2][3]. 2. static wxString FromUTF8(const char *s, size_t len) Converts a UTF-8 C string of a specified length to a wxString [2][4]. 3. static wxString FromUTF8(const std::string &s) Converts a UTF-8 encoded std::string to a wxString [2][5]. These methods assume that the input string is a valid UTF-8 sequence [4]. Validation is typically performed in debug builds, while release builds may skip it for performance reasons [4]. These functions are the recommended way to convert UTF-8 data to wxString, especially when the application uses the wxNO_IMPLICIT_WXSTRING_ENCODING compilation option to prevent unsafe implicit conversions [1][6][7].
</search_synthesis>
<source_evidence>
Citations:
- 1: https://docs.wxwidgets.org/latest/classwx_string.html
- 2: https://docs.wxwidgets.org/stable/classwx_string.html
- 3: https://docs.wxwidgets.org/latest/overview_string.html
- 4: https://docs.wxwidgets.org/2.8/wx_wxstring.html
- 5: GitHub issue 17461 in wxWidgets/wxWidgets (link omitted to avoid creating a cross-reference)
- 6: https://docs.wxwidgets.org/latest/overview_mbconv.html
- 7: https://docs.wxwidgets.org/stable/overview_string.html
🏁 Script executed:
set -eu
rg -n --hidden --glob '!build/**' --glob '!node_modules/**' \
'wxNO_IMPLICIT_WXSTRING_ENCODING|wxNO_UNSAFE_WXSTRING_CONV|wxUSE_UNICODE_UTF8|wxUSE_UNICODE_WCHAR|wxWidgets.*version|WXWIDGETS' \
. 2>/dev/null | head -200Repository: audacity/audacity
Length of output: 637
🏁 Script executed:
set -eu
rg -n -C 3 'VST3EffectBase::GetPath|GetPath[[:space:]]*\(|PluginPath' \
au3/libraries/au3-vst3 au3/libraries/au3-components au3 2>/dev/null | head -240Repository: audacity/audacity
Length of output: 18402
Return the helper result directly. MakePluginPathString returns wxString. FromUTF8 has no wxString overload, but the default wxWidgets configuration allows an implicit conversion to current-locale narrow text before FromUTF8 decodes it. A non-UTF-8 locale can therefore change a non-ASCII module path. This path implements ComponentInterface::GetPath and is later parsed for plugin loading.
| return VST3Utils::MakePluginPathString(wxString::FromUTF8(mModule->getPath()), mEffectClassInfo->ID().toString()); | |
| return VST3Utils::MakePluginPathString(wxString::FromUTF8(mModule->getPath()), mEffectClassInfo->ID().toString()); |
There was a problem hiding this comment.
Caution
Some comments are outside the diff and can’t be posted inline due to GitHub limitations.
🟡 Minor · Restore the previous temporary state before restoring the filename. · ProjectFileIO.cpp:642-643
au3/libraries/au3-project-file-io/ProjectFileIO.cpp:642-643
🎯 Functional Correctness | 🟡 Minor | ⚡ Quick winRestore the previous temporary state before restoring the filename.
When recovery is cancelled after the missing-document branch sets
mTemporary = true,RestoreConnection()callsSetFileName(mPrevFileName)while the temporary state is still active.SetFileName()then clears the restored permanent project's name and sets its title as untitled. MovemTemporary = mPrevTemporary;beforeSetFileName(mPrevFileName).
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI (base), Organization UI (inherited)
Review profile: CHILL
Plan: Advanced
Run ID: b9096331-74a7-4f63-ad10-de7bb9f754c0
📒 Files selected for processing (3)
au3/libraries/au3-project-file-io/ProjectFileIO.cppsrc/project/tests/CMakeLists.txtsrc/project/tests/projectrecovery_tests.cpp
Included review availability: Your plan provides up to 10 included reviews per hour; 9 remain after this review.
Fixes broken names of plugins with non-ASCII filenames
Fixes media import from non-ASCII paths
2d75dcc to
fe5c031
Compare
Fix codepage conversion issues (#12115)
Resolves: (#8267)
those issues mostly present on windows only and depend on system locale
Recommended:
QA: