Description: QR-code generator make non-correct QR for non latine phrase Steps to Reproduce: 1. Open Writer 2. Select Insert->QR code 3. In URL/Text field type phrase "Я люблю космос" and press OK button 4. Try read QR code from screen with your smartphone's QR reader soft => I see only ? ????? ????? If I try english phrase like "I like a Space" then my smartphone's QR reader shows me correct phrase Actual Results: I see only ? ????? ????? Expected Results: I should see correct russian phrase Reproducible: Always User Profile Reset: No Additional Info: Version: 6.4.0.0.alpha0+ (x86) Build ID: a1a401acaafee0b1f154d368a247d74d61c62191 CPU threads: 4; OS: Windows 6.1; UI render: default; VCL: win; TinderBox: Win-x86@62-TDF, Branch:MASTER, Time: 2019-08-28_15:45:26 Locale: ru-RU (ru_RU); UI-Language: en-US Calc: threaded
Created attachment 153741 [details] Example with QR-code
On Win10 with master sources updated yesterday, I could reproduce this.
Shubham: I tested this patch: diff --git a/cui/source/dialogs/QrCodeGenDialog.cxx b/cui/source/dialogs/QrCodeGenDialog.cxx index 661d36678c07..7bd72ff0fc1c 100644 --- a/cui/source/dialogs/QrCodeGenDialog.cxx +++ b/cui/source/dialogs/QrCodeGenDialog.cxx @@ -259,7 +259,7 @@ OUString QrCodeGenDialog::GenerateQRCode(OUString aQRText, long aQRECC, int aQRB } //OuString to char* qrtext - OString o = OUStringToOString(aQRText, RTL_TEXTENCODING_ASCII_US); + OString o = OUStringToOString(aQRText, RTL_TEXTENCODING_UTF8); const char* qrtext = o.pData->buffer; //From Qr Code library. it seemed ok to me but perhaps there would be some side effect. Any thoughts? I can submit it on gerrit after my day time job if you're ok or you can do it if you prefer.
(In reply to Julien Nabet from comment #3) > Any thoughts? Given that workdir/UnpackedTarball/qrcodegen/cpp/QrCode.hpp:73 has this for qrcodegen::QrCode::encodeText: > /* > * Returns a QR Code representing the given Unicode text string at the given error correction level. > * As a conservative upper bound, this function is guaranteed to succeed for strings that have 2953 or fewer > * UTF-8 code units (not Unicode code points) if the low error correction level is used. The smallest possible > * QR Code version is automatically chosen for the output. The ECC level of the result may be higher than > * the ecl argument if it can be done without increasing the version. > */ I suppose the change is perfectly correct; Julien please do submit it (it's your patch ;-))
https://gerrit.libreoffice.org/#/c/78304/
Julien Nabet committed a patch related to this issue. It has been pushed to "master": https://git.libreoffice.org/core/+/8cecd48af5dbd290d06641b7feeb7c0969752d57%5E%21 tdf#127233: QR-code generator, use UTF-8 encoding It will be available in 6.4.0. The patch should be included in the daily builds available at https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: https://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.
verified in Version: 6.4.0.0.alpha0+ (x86) Build ID: 1485bcc796dd8bd53762368ec4a1345ddb7cda72 CPU threads: 4; OS: Windows 6.1; UI render: default; VCL: win; TinderBox: Win-x86@62-TDF, Branch:MASTER, Time: 2019-09-02_10:30:21 Locale: ru-RU (ru_RU); UI-Language: en-US Calc: threaded Thanks Julien and Mike ;-)