[Lldb-commits] [PATCH] D105779: RFC: [lldb] Fix editline unicode on Linux
Jan Kratochvil via Phabricator via lldb-commits
lldb-commits at lists.llvm.org
Sun Jul 11 06:42:57 PDT 2021
jankratochvil created this revision.
jankratochvil added reviewers: teemperor, nealsid, labath.
jankratochvil added a project: LLDB.
Herald added a subscriber: JDevlieghere.
jankratochvil requested review of this revision.
[[ https://lists.llvm.org/pipermail/lldb-dev/2021-July/016961.html | [lldb-dev] proposed change to remove conditional WCHAR support in libedit wrapper ]]
There is already `setlocale` in lldb/source/Core/IOHandlerCursesGUI.cpp <https://github.com/llvm/llvm-project/blob/main/lldb/source/Core/IOHandlerCursesGUI.cpp#L2631> but that does not apply for Editline GUI editing.
Unaware how to make automated test for this, it requires pty.
Also maybe it is not needed on OSX so it should be excluded there?
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D105779
Files:
lldb/source/Host/common/Editline.cpp
Index: lldb/source/Host/common/Editline.cpp
===================================================================
--- lldb/source/Host/common/Editline.cpp
+++ lldb/source/Host/common/Editline.cpp
@@ -1401,6 +1401,9 @@
}
}
#endif
+
+ // Required for libedit unicode as it uses iswprint.
+ ::setlocale(LC_CTYPE, "");
}
Editline::~Editline() {
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D105779.357797.patch
Type: text/x-patch
Size: 354 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20210711/5b8fbc53/attachment.bin>
More information about the lldb-commits
mailing list