jabref icon indicating copy to clipboard operation
jabref copied to clipboard

LO/OO bibliography error when using citations with non-Latin charcters

Open subhramit opened this issue 6 months ago • 5 comments

JabRef version

6.0-alpha2

Operating system

Windows

Details on version and operating system

Windows 11

Checked with the latest development build (copy version output from About dialog)

  • [x] I made a backup of my libraries before testing the latest development version.
  • [x] I have tested the latest development version and the problem persists

Steps to reproduce the behaviour

  1. Start JabRef
  2. Start a LibreOffice Writer document instance
  3. Connect to the document instance from JabRef's OO/LO panel
  4. Open a new library
  5. Add the following entries to your library:
@Article{Ты2025,
  author = {Ты},
  title  = {You},
  year   = {2025},
}

@Article{Я2025,
  author = {Я},
  title  = {I},
  year   = {2025},
}
  1. Select a CSL style from the "Select Style" dialog of the OO/LO panel
  2. Cite any of the above entries
  3. Click the "Make/Sync" bibliography button from the OO/LO panel (not needed if OO Panel->Settings->Automatically sync bibliography is enabled)

You will observe the following exception (see appendix) along with the error dialog:

No cited entries found in the document.

And log:

2025-06-10 22:32:55 [JavaFX Application Thread] org.jabref.logic.openoffice.ReferenceMark.parse()
WARN: CSLReferenceMark: name=JABREF_Ты2025 CID_1 e2b1z2jv does not match pattern. Assuming random values

Cause

Non-Latin characters are not recognized valid in the "reference marks" format used for LO/OO in JabRef

Hints to solve

Adapt the regex in: https://github.com/JabRef/jabref/blob/1ba35d20dbdd0b4aac33e1e594269d76302791b0/jablib/src/main/java/org/jabref/logic/openoffice/ReferenceMark.java#L18-L19

Pre-requisite context for people not familiar with this aspect of JabRef:

OO/LO integration: https://docs.jabref.org/cite/openofficeintegration CSL styles - citing and generating bibliographies: https://blog.jabref.org/2024/08/26/GSoC-CSL/ "Reference marks" in LibreOffice: https://devdocs.jabref.org/code-howtos/openoffice/overview.html (may be slightly outdated but conceptually valid).

Test for completion:

Screen recording of bibliography being successfully generated in the document from the entries mentioned.

Appendix

...

Log File
com.sun.star.uno.RuntimeException: Nothing to unlock
	at org.libreoffice.uno/com.sun.star.lib.uno.environments.remote.Job.remoteUnoRequestRaisedException(Job.java:158)
	at org.libreoffice.uno/com.sun.star.lib.uno.environments.remote.Job.execute(Job.java:122)
	at org.libreoffice.uno/com.sun.star.lib.uno.environments.remote.JobQueue.enter(JobQueue.java:312)
	at org.libreoffice.uno/com.sun.star.lib.uno.environments.remote.JobQueue.enter(JobQueue.java:281)
	at org.libreoffice.uno/com.sun.star.lib.uno.environments.remote.JavaThreadPool.enter(JavaThreadPool.java:81)
	at org.libreoffice.uno/com.sun.star.lib.uno.bridges.java_remote.java_remote_bridge.sendRequest(java_remote_bridge.java:619)
	at org.libreoffice.uno/com.sun.star.lib.uno.bridges.java_remote.ProxyFactory$Handler.request(ProxyFactory.java:145)
	at org.libreoffice.uno/com.sun.star.lib.uno.bridges.java_remote.ProxyFactory$Handler.invoke(ProxyFactory.java:129)
	at jdk.proxy2/jdk.proxy2.$Proxy24.unlockControllers(Unknown Source)
	at org.jabref/org.jabref.gui.openoffice.OOBibBase.guiActionInsertEntry(OOBibBase.java:619)
	at org.jabref/org.jabref.gui.openoffice.OpenOfficePanel.pushEntries(OpenOfficePanel.java:582)
	at org.jabref/org.jabref.gui.openoffice.OpenOfficePanel.lambda$initPanel$5(OpenOfficePanel.java:259)
	at javafx.base@25-ea/com.sun.javafx.event.CompositeEventHandler.dispatchBubblingEvent(CompositeEventHandler.java:86)
	at javafx.base@25-ea/com.sun.javafx.event.EventHandlerManager.dispatchBubblingEvent(EventHandlerManager.java:232)
	at javafx.base@25-ea/com.sun.javafx.event.EventHandlerManager.dispatchBubblingEvent(EventHandlerManager.java:189)
	at javafx.base@25-ea/com.sun.javafx.event.CompositeEventDispatcher.dispatchBubblingEvent(CompositeEventDispatcher.java:59)
	at javafx.base@25-ea/com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:58)
	at javafx.base@25-ea/com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)
	at javafx.base@25-ea/com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:56)
	at javafx.base@25-ea/com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)
	at javafx.base@25-ea/com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:56)
	at javafx.base@25-ea/com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)
	at javafx.base@25-ea/com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:56)
	at javafx.base@25-ea/com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)
	at javafx.base@25-ea/com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:56)
	at javafx.base@25-ea/com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)
	at javafx.base@25-ea/com.sun.javafx.event.EventUtil.fireEventImpl(EventUtil.java:74)
	at javafx.base@25-ea/com.sun.javafx.event.EventUtil.fireEvent(EventUtil.java:49)
	at javafx.base@25-ea/javafx.event.Event.fireEvent(Event.java:199)
	at javafx.graphics@25-ea/javafx.scene.Node.fireEvent(Node.java:9005)
	at javafx.controls@25-ea/javafx.scene.control.Button.fire(Button.java:203)
	at javafx.controls@25-ea/com.sun.javafx.scene.control.behavior.ButtonBehavior.mouseReleased(ButtonBehavior.java:207)
	at javafx.controls@25-ea/com.sun.javafx.scene.control.inputmap.InputMap.handle(InputMap.java:274)
	at javafx.base@25-ea/com.sun.javafx.event.CompositeEventHandler$NormalEventHandlerRecord.handleBubblingEvent(CompositeEventHandler.java:247)
	at javafx.base@25-ea/com.sun.javafx.event.CompositeEventHandler.dispatchBubblingEvent(CompositeEventHandler.java:80)
	at javafx.base@25-ea/com.sun.javafx.event.EventHandlerManager.dispatchBubblingEvent(EventHandlerManager.java:232)
	at javafx.base@25-ea/com.sun.javafx.event.EventHandlerManager.dispatchBubblingEvent(EventHandlerManager.java:189)
	at javafx.base@25-ea/com.sun.javafx.event.CompositeEventDispatcher.dispatchBubblingEvent(CompositeEventDispatcher.java:59)
	at javafx.base@25-ea/com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:58)
	at javafx.base@25-ea/com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)
	at javafx.base@25-ea/com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:56)
	at javafx.base@25-ea/com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)
	at javafx.base@25-ea/com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:56)
	at javafx.base@25-ea/com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)
	at javafx.base@25-ea/com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:56)
	at javafx.base@25-ea/com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)
	at javafx.base@25-ea/com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:56)
	at javafx.base@25-ea/com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)
	at javafx.base@25-ea/com.sun.javafx.event.EventUtil.fireEventImpl(EventUtil.java:74)
	at javafx.base@25-ea/com.sun.javafx.event.EventUtil.fireEvent(EventUtil.java:54)
	at javafx.base@25-ea/javafx.event.Event.fireEvent(Event.java:199)
	at javafx.graphics@25-ea/javafx.scene.Scene$MouseHandler.process(Scene.java:4005)
	at javafx.graphics@25-ea/javafx.scene.Scene.processMouseEvent(Scene.java:1934)
	at javafx.graphics@25-ea/javafx.scene.Scene$ScenePeerListener.mouseEvent(Scene.java:2763)
	at javafx.graphics@25-ea/com.sun.javafx.tk.quantum.GlassViewEventHandler$MouseEventNotification.get(GlassViewEventHandler.java:352)
	at javafx.graphics@25-ea/com.sun.javafx.tk.quantum.GlassViewEventHandler$MouseEventNotification.get(GlassViewEventHandler.java:254)
	at javafx.graphics@25-ea/com.sun.javafx.tk.quantum.QuantumToolkit.runWithoutRenderLock(QuantumToolkit.java:424)
	at javafx.graphics@25-ea/com.sun.javafx.tk.quantum.GlassViewEventHandler.handleMouseEvent(GlassViewEventHandler.java:386)
	at javafx.graphics@25-ea/com.sun.glass.ui.View.handleMouseEvent(View.java:560)
	at javafx.graphics@25-ea/com.sun.glass.ui.View.notifyMouse(View.java:946)
	at javafx.graphics@25-ea/com.sun.glass.ui.gtk.GtkApplication._runLoop(Native Method)
	at javafx.graphics@25-ea/com.sun.glass.ui.gtk.GtkApplication.lambda$runLoop$1(GtkApplication.java:240)
	at java.base/java.lang.Thread.run(Thread.java:1447)

subhramit avatar Jun 10 '25 21:06 subhramit

Note: After adapting the regex, in case LibreOffice doesn't support reference marks with non Latin characters, please report here with the fix you tried, error faced, etc..

subhramit avatar Jun 10 '25 21:06 subhramit

Hi! i want to work on this issue as my first Java contribution. I’ll update the regex to support Unicode characters and test it using the entries you mentioned. Thanks!

RUSHILPATEL33 avatar Jun 13 '25 17:06 RUSHILPATEL33

Hi! i want to work on this issue as my first Java contribution. I’ll update the regex to support Unicode characters and test it using the entries you mentioned. Thanks!

Hi, welcome. Please go through our CONTRIBUTING.md. Use the /assign-me action to get assigned to the issue.

subhramit avatar Jun 13 '25 18:06 subhramit

/assign-me

RUSHILPATEL33 avatar Jun 13 '25 18:06 RUSHILPATEL33

👋 Hey @RUSHILPATEL33, thank you for your interest in this issue! 🎉

We're excited to have you on board. Start by exploring our Contributing guidelines, and don't forget to check out our workspace setup guidelines to get started smoothly.

For questions on JabRef functionality and the code base, you can consult the JabRef Guru or ask on our Gitter chat.

In case you encounter failing tests during development, please check our developer FAQs!

Having any questions or issues? Feel free to ask here on GitHub. Need help setting up your local workspace? Join the conversation on JabRef's Gitter chat. And don't hesitate to open a (draft) pull request early on to show the direction it is heading towards. This way, you will receive valuable feedback.

Happy coding! 🚀

github-actions[bot] avatar Jun 13 '25 18:06 github-actions[bot]

/assign-me

siriusb791 avatar Jun 21 '25 05:06 siriusb791

👋 Hey @siriusb791, thank you for your interest in this issue! 🎉

We're excited to have you on board. Start by exploring our Contributing guidelines, and don't forget to check out our workspace setup guidelines to get started smoothly.

For questions on JabRef functionality and the code base, you can consult the JabRef Guru or ask on our Gitter chat.

In case you encounter failing tests during development, please check our developer FAQs!

Having any questions or issues? Feel free to ask here on GitHub. Need help setting up your local workspace? Join the conversation on JabRef's Gitter chat. And don't hesitate to open a (draft) pull request early on to show the direction it is heading towards. This way, you will receive valuable feedback.

Happy coding! 🚀

github-actions[bot] avatar Jun 21 '25 05:06 github-actions[bot]

⏰ Assignment Reminder

Hi @siriusb791, this is a friendly reminder about your assignment to this issue.

[!WARNING] This issue will be automatically unassigned in 11 days if there's no activity.

Remember that you can ask the JabRef Guru or DeepWiki about anything regarding JabRef. Additionally, our contributing guide has hints on creating a pull request and a link to our Gitter chat.

How to keep your assignment


If you are working on it, you can prevent automatic unassignment by:

  • Submitting a draft pull request with your progress within 11 days
  • Asking for the 📌 Pinned label if you need more time

We appreciate your contribution and are here to help if needed!

github-actions[bot] avatar Jul 01 '25 12:07 github-actions[bot]

/unassign @siriusb791

Reason: prologned inactivity.

subhramit avatar Jul 23 '25 16:07 subhramit

/assign-me

AlexisFimeyer avatar Jul 25 '25 20:07 AlexisFimeyer

👋 Hey @AlexisFimeyer, thank you for your interest in this issue! 🎉

We're excited to have you on board. Start by exploring our Contributing guidelines, and don't forget to check out our workspace setup guidelines to get started smoothly.

For questions on JabRef functionality and the code base, you can consult the JabRef Guru or ask on our Gitter chat.

In case you encounter failing tests during development, please check our developer FAQs!

Having any questions or issues? Feel free to ask here on GitHub. Need help setting up your local workspace? Join the conversation on JabRef's Gitter chat. And don't hesitate to open a (draft) pull request early on to show the direction it is heading towards. This way, you will receive valuable feedback.

Happy coding! 🚀

github-actions[bot] avatar Jul 25 '25 20:07 github-actions[bot]

We think that this issue was fixed. Please head to https://builds.jabref.org/main to download a development build and try it out.

For any feedback, add a comment to the pull request at https://github.com/JabRef/jabref/pull/13590.

github-actions[bot] avatar Jul 29 '25 08:07 github-actions[bot]