Description: When using [File]>[Export Basic] to save macro code, some chracters are replaced by "?". No problems when using [File]>[Save] or "clipboard" (copy'n'paste). Steps to Reproduce: [1] Test OKAY: + Start Basic-IDE. + Save file "Test_Save_vs_ExportBasic_MAKRO.bas" using [File]>[Save]. + Finisch Basic-IDE and start Basic-IDE again. + Take a look at code line "MsgBox(...)". [2] Test ERROR: + Start Basic-IDE. + Save file "Test_Save_vs_ExportBasic_MAKRO.bas" using [File]>[Export Basic]. + Finisch Basic-IDE and open file the macro was exported to. + Take a look at code line "MsgBox(...)". Actual Results: [1] Basic-IDE - [File]>[Save] - Symbol "less than" is to be seen. [2] Basic-IDE - [File]>[Export Basic] - Symbol "less than" is replaced by character "?". Expected Results: [1] Basic-IDE - [File]>[Save] - Symbol "less than" is to be seen. [2] Basic-IDE - [File]>[Export Basic] - Symbol "less than" should not be replaced by character "?". Reproducible: Always User Profile Reset: No Additional Info: Tested using LO6.4.6.2/LO7.0.1.2 @ Windows 10 Home !
Created attachment 165686 [details] Test_Save_vs_ExportBasic_MAKRO.bas
File "Test_Save_vs_ExportBasic_MAKRO.bas": [1] Bugzilla View: Symbol "less than" is not to be seen ! [2] Bugzilla Download: Symbol "less than" is to be seen !
I cannot reproduce. Version: 7.1.0.0.alpha0+ (x64) Build ID: f266feaebea39668392e3a3830e20e4670344658 CPU threads: 4; OS: Windows 10.0 Build 18363; UI render: default; VCL: win Locale: ja-JP (ja_JP); UI: en-US Calc: threaded
Macro to be saved using [File][Export Basic]: Sub Test_Save_vs_ExportBasic() MsgBox("≤") End Sub Additional Test [1] - ERROR: Symbol "less than" ( "≤" ) saved as "?" Version: 7.0.2.2 (x64) Build ID: 8349ace3c3162073abd90d81fd06dcfb6b36b994 CPU threads: 4; OS: Windows 10.0 Build 19041; UI render: Skia/Raster; VCL: win Locale: de-DE (de_DE); UI: en-US Calc: CL Additional Test [2] - ERROR: Symbol "less than" ( "≤" ) saved as "?" Version: 7.1.0.0.alpha0+ (x64) Build ID: f266feaebea39668392e3a3830e20e4670344658 CPU threads: 4; OS: Windows 10.0 Build 19041; UI render: Skia/Raster; VCL: win Locale: de-DE (de_DE); UI: en-US Calc: CL I can't confirm "Comment 3". Symbol "less than" always replaced by "?" after saving macro using [File][Export Basic].
https://docs.libreoffice.org/vcl/html/texteng_8cxx_source.html#l02441 https://opengrok.libreoffice.org/xref/core/basctl/source/basicide/baside2b.cxx?r=e6dfaf9f&fi=setTextEngineText#130 https://opengrok.libreoffice.org/xref/core/tools/source/stream/stream.cxx?r=aef7feb3#341 note: I have the following RISKY 'Beta: Use Unicode UTF-8 for worldwide language support' turned on. https://superuser.com/questions/1033088/is-it-possible-to-set-locale-of-a-windows-application-to-utf-8
forgot to add: https://opengrok.libreoffice.org/xref/core/basctl/source/basicide/baside2.cxx?r=e67657d5#486
Many thanks for the hint: "I have the following RISKY 'Beta: Use Unicode UTF-8 for worldwide language support' turned on.". I switched "Unicode UTF-8" support on ( see attached file "Windows 10 - Beta - Unicode UTF-8.png" ) and now "[File]>[Export Basic]" works fine with all LO version. Therfore now I can confirm all your comments. Greetings from Germany :-))
Created attachment 166063 [details] Windows 10 - Beta - Unicode UTF-8
*** This bug has been marked as a duplicate of bug 139196 ***