openedx / openedx/openedx-platform

export/import course issue due to emojies in poll component

Open
#36,808 6 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
8.2k
Forks
4.4k
Avg merge
6d 18h
Merged PRs (30d)
42

Description

If a poll component has emojies in it like we have in below image, and we export the course it will have
\ud83d\ude00 instead of 😀
\ud83d\ude42 instead of 🙂
\ud83d\ude10 instead of 😐
\ud83d\ude41 instead of 🙁
\ud83d\ude22 instead of 😢

Image

And then If we try importing the same course zip file, it throws an error
Task cms.djangoapps.contentstore.tasks.import_olx[ecf51b4a-6082-44c8-a6c3-3be17ab5bcfd] raised unexpected: UnicodeEncodeError('utf-8', '<br/><span style=font-size:4em;>\ud83d\ude00</span><br/><br/>', 32, 34, 'surrogates not allowed')

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the export and import flow with a poll component containing the listed emoji, then inspect the cms.djangoapps.contentstore.tasks.import_olx entry point and the course ZIP handling it invokes. Done means exported content preserves the emoji characters and importing the same ZIP completes without the reported UnicodeEncodeError.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
backend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.