Created attachment 182851 [details] Example file with accented characters in docvariable This is a followup to bug 150267 When a document variable contains accented characters in the name or value, the import is incorrect and only the part starting with the last accented character is imported. 1, Open attached RTF file in Word and then in Writer 2/a, In Word go to the Developer ribbon, Visual Basic button 2/b, Under ThisDocument create and run the following macro: Sub GetSetDocVars() For Each myVar In ActiveDocument.Variables MsgBox "Name =" & myVar.Name & vbCr & "Value = " & myVar.Value Next myVar End Sub This should print in the popup dialog the name (LocalCharsÁrvízturoTükörfúrógép) and value (árvízturo tükörfúrógép) of the document variable, full of accented characters. 3/a In Writer go to the Fields dialog (Ctrl-F2) and to Variables tab - User field type. 3/b Observe the name and value is just "ép" so the last two chars. Version: 7.5.0.0.alpha0+ (x64) / LibreOffice Community Build ID: cc038c471e96d766db404388b140364614898bf2 CPU threads: 14; OS: Windows 10.0 Build 19044; UI render: Skia/Raster; VCL: win Locale: en-US (hu_HU); UI: en-US Calc: threaded
Created attachment 182852 [details] How the docvar looks in Word 2016 and Writer
Created attachment 182853 [details] Docm file used to generate the variable Unfortunately this is saved to RTF with 1252 encoding, so I could not use őű chars :(.
Vasily Melenchuk committed a patch related to this issue. It has been pushed to "master": https://git.libreoffice.org/core/commit/0d545f1f0afc93bd568f8172a134ab9196529809 tdf#151370: RTF import: docvar name/value can have several sequences It will be available in 7.5.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.
Vasily Melenchuk committed a patch related to this issue. It has been pushed to "libreoffice-7-4": https://git.libreoffice.org/core/commit/564ec69c3d2cf591c80dbb561bf04fe3c6180f31 tdf#151370: RTF import: docvar name/value can have several sequences It will be available in 7.4.3. 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.