automaciej / whatsapp-archive

Format your exported WhatsApp conversation in HTML
GNU General Public License v3.0
35 stars 15 forks source link

Add support for RTL messages #5

Open dov opened 5 years ago

dov commented 5 years ago

Messages in RTL languages are not formatted correctly in the output. To correctly support RTL the following is needed:

  1. Recognize that the message is in RTL by recognizing that the first "strong" character (as defined by the unicode bidirectional algorithm) is a strong RTL character. (Other heuristics exists e.g. if a majority of characters in the message are RTL.)
  2. Add <span dir="RTL">...</span> around the message.
automaciej commented 5 years ago

Is there any chance you could help? Test data, or examples, would help. A piece of an RTL export. I have zero experience with RTL languages.

automaciej commented 4 years ago

@dov – could you show / paste / upload an example of an RTL export? I can't code it without test data.

automaciej commented 1 year ago

https://github.com/dsadinoff/whatsapp-archive seems to contain bidirectional text support. Unfortunately there are many other changes and I can't simply merge the bidirectional support into my code.