<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class="">Hello,<div class=""><br class=""></div><div class="">I was thinking of removing the conditional compilation to use libedit’s <font face="Courier New" class="">WCHAR</font> support on non-Windows platforms.  The conditional preprocessor logic is definitely the correct way to support both wide & narrow character APIs, but editline has enabled the wide API’s by default for some time, and there might be an opportunity today to simplify it.  </div><div class=""><br class=""></div><div class="">I’m thinking that using the wide-character API and converting to narrow-character string whenever interacting with the rest of LLDB makes the most sense.  One hopefully small issue that the history filename is determined based on whether WCHAR is used or not.  So history might not work unless people rename their file after using a version with this change.  From what I could tell, the format of the file is actually the same whether you use <font face="Courier New" class="">history()</font> or <font face="Courier New" class="">history_w()</font>, so it doesn’t have to be converted from narrow chars to wide characters, although I only tested that on OS X.</div><div class=""><br class=""></div><div class="">There is a WIP of what this might look like here: <a href="https://github.com/llvm/llvm-project/compare/main...nealsid:lldb-editline-remove-wchar" class="">https://github.com/llvm/llvm-project/compare/main...nealsid:lldb-editline-remove-wchar</a> However, it uses the narrow character libedit API. But it gives an idea of what changes will be necessary.  </div><div class=""><br class=""></div><div class="">Anyone else think this could be useful? Or, conversely, does anyone see something that I missed that requires the conditional compilation to remain in? Since a broken shell would be bad for everyone, I am not sure what the best way is to verify who it might break, i.e. if people who use LLDB from head want to test it first, or other platforms to consider besides OS X/Linux/Windows.</div><div class=""><br class=""></div><div class="">Thanks,</div><div class=""><br class=""></div><div class="">Neal</div><div class=""><br class=""></div><div class=""><br class=""></div></body></html>