https://bugs.documentfoundation.org/show_bug.cgi?id=156956
--- Comment #3 from Duncan Roe <[email protected]> --- git bisect of branch libreoffice-7-6-0 identifies: f7d4efc02118a92a3f3cb17ea131674e88907a7b is the first bad commit commit f7d4efc02118a92a3f3cb17ea131674e88907a7b Author: Radhey Parekh <[email protected]> Date: Mon Jan 16 02:13:53 2023 +0530 tdf#146638 In a titlebar, separator is changed from a hyphen to an emdash Change-Id: Ibf79dfd4c3e2f44ba4564567cd5e3f3650095719 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145542 Tested-by: Jenkins Reviewed-by: Heiko Tietze <[email protected]> framework/inc/strings.hrc | 1 + framework/source/fwe/helper/titlehelper.cxx | 5 ++++- 2 files changed, 5 insertions(+), 1 deletion(-) This is the patch: git diff 5ed9bb8bdcb1bee63d89909eed82110da31edfe5 f7d4efc02118a92a3f3cb17ea131674e88907a7b diff --git a/framework/inc/strings.hrc b/framework/inc/strings.hrc index 18b372915b9b..182c3cf120ac 100644 --- a/framework/inc/strings.hrc +++ b/framework/inc/strings.hrc @@ -36,6 +36,7 @@ #define STR_CLEAR_RECENT_FILES NC_("STR_CLEAR_RECENT_FILES", "Clear List") #define STR_CLEAR_RECENT_FILES_HELP NC_("STR_CLEAR_RECENT_FILES_HELP", "Clears the list with the most recently opened files. This action can not be undone.") #define STR_REMOTE_TITLE NC_("STR_REMOTE_TITLE", " (Remote)") +#define STR_EMDASH_SEPARATOR NC_("STR_EMDASH_SEPARATOR", " รข ") #define STR_SAFEMODE_TITLE NC_("STR_SAFEMODE_TITLE", " (Safe Mode)") #define STR_TOOLBAR_TITLE_ADDON NC_("STR_TOOLBAR_TITLE_ADDON", "Add-On %num%") #define STR_FULL_DISC_RETRY_BUTTON NC_("STR_FULL_DISC_RETRY_BUTTON", "Retry" ) diff --git a/framework/source/fwe/helper/titlehelper.cxx b/framework/source/fwe/helper/titlehelper.cxx index aa4e8f0b2010..51025f71e4a5 100644 --- a/framework/source/fwe/helper/titlehelper.cxx +++ b/framework/source/fwe/helper/titlehelper.cxx @@ -536,7 +536,10 @@ void TitleHelper::impl_appendProductName (OUStringBuffer& sTitle) if (!name.isEmpty()) { if (!sTitle.isEmpty()) - sTitle.append(" - "); + { + OUString separator (FwkResId (STR_EMDASH_LANG=en_USSEPARATOR)); + sTitle.append(separator); + } sTitle.append(name); } } This falls down in a non-UTF8 locale, e.g. LANG=en_US as I have. REPRODUCER: Ensure no libreoffice instances running, enter e.g. LANG=en_US, start libreoffice on some file, put LANG back to what it was. MY WORKAROUND: LANG=en_US.UTF-8; libreoffice ~/calendar.ods& LANG=en_US SUGGESTED FIX: either check whether locale is UTF-8 with `nl_langinfo(CODESET)` (or nl_langinfo_l), or revert f7d4efc02118. -- You are receiving this mail because: You are the assignee for the bug.
