Cannot export with chinese file name

Bug #1184947 reported by Sherry
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Mahara
Invalid
Low
Kevin Dibble

Bug Description

I encounter export problem with any file (within the content -> file) with chinese file name:
1. If I choose to export to LEAP2A, the file is missing in the exported file.
2. If I choose to export to HTML, the file name become garbled.

version: Mahara 1.7
server OS: ubuntu 10.04
php: 5.3.2.1.4.19
database: mysql 5.1.69.0.0.10.04.1

Aaron Wells (u-aaronw)
Changed in mahara:
importance: Undecided → Low
status: New → Triaged
tags: added: i18n
tags: added: bite-sized
Revision history for this message
Robert Lyon (robertl-9) wrote :

I note from testing with both the latest mahara 1.7.4 and 1.8 and having a file called 測試.txt and exporting just one page

- it seems to export the file for HTML fine
- for Leap2a it alters the name of the file to 0-測試.txt

So there is a problem here, so will mark bug confirmed.

Changed in mahara:
status: Triaged → Confirmed
tags: added: academy
Changed in mahara:
assignee: nobody → Sylvi Low (sylvilow-student)
Changed in mahara:
assignee: Sylvi Low (sylvilow-student) → nobody
Changed in mahara:
assignee: nobody → Mason Warring (corgifan2)
Changed in mahara:
assignee: Mason Warring (corgifan2) → nobody
Revision history for this message
Kevin Dibble (digitalskill) wrote :

When creating a leap2a export - the file name gets appended with an id. This is expected behavior as without this id before the file name, the leap 2a cannot be re-imported.

So the 0-測試.txt is expected working.

The garbling of Chinese names is not to do with the import/export, but the language support on the server itself.
https://unix.stackexchange.com/questions/149348/how-to-display-chinese-characters-correctly-on-remote-red-hat-machine

Basically, this may be a problem of mismatch between your locale, which is set to UTF-8, and the encoding of your Chineses character file, which may be encoded in gbk, gb2312, gb18030, or Big-5.

The solution is to update the server to support different locale and languages.

I would suggest to update the Mahara wiki for noting this to server admins that need to support different languages and closing this issue here.

Revision history for this message
Mahara Bot (dev-mahara) wrote : A patch has been submitted for review

Patch for "master" branch: https://reviews.mahara.org/9671

Changed in mahara:
assignee: nobody → Kevin Dibble (digitalskill)
status: Confirmed → In Progress
Revision history for this message
Steven (stevens-q) wrote :

Environment tested: Master & with Patch on master
Browser tested: Chrome

PRECONDITIONS:
------------------------
1) Mahara user1 exists (no roles)
2) Mahara user2 exists (no roles)
3) User portfolio page exists and has the following
      a) Text block with chinese characters for tittle and content
      b) File block with a file named 我的个人资料内容.txt
      c) Image file with a file named 兔八哥.jpg

TEST STEPS:
------------------------
1) Log in as Mahara user1
2) Export portfolio page as a Standalone HTML website
3) Export portfolio page as a Leap2a file
4) Log out and Log in as Mahara user2
5) Import the Leap2a file and add the content
6) Verify that the imported portfolio page and all of the blocks and files have not changed or become garbled ✔

Viewing the Standalone HTML
---------------------------------------------
7) Open the verify that the index.hml in a browser
8) Browse to the Portfolio page
9) Verify that the portfolio page and all of the blocks and files have not changed or become garbled ✔

Catalyst QA - everything working as expected - could not replicate bug

Revision history for this message
Kevin Dibble (digitalskill) wrote :

Hi Steven,

Agree that this is not a mahara issue - but the language support on the server itself.
Are you happy for me to close this issue as invalid?

Changed in mahara:
status: In Progress → Invalid
Revision history for this message
Mahara Bot (dev-mahara) wrote : A change has been merged

Reviewed: https://reviews.mahara.org/9671
Committed: https://git.mahara.org/mahara/mahara/commit/39bf115954bd822ac432968cdbad51d4fabdc6fe
Submitter: Robert Lyon (<email address hidden>)
Branch: master

commit 39bf115954bd822ac432968cdbad51d4fabdc6fe
Author: Kevin Dibble <email address hidden>
Date: Wed Mar 27 15:43:32 2019 +1300

Bug 1184947 : Chinese names of files when exporting

The only issue found when looking into this bug
is the directory name reported is not set.
it was using the variable $todir but the actual
directory name is in the variable $to.

On the Chinese character issue: this is server side:
When creating a leap2a export - the file name gets
appended with an id. This is expected behaviour as
without this id before the file name, the leap 2a cannot
be re-imported.

So the 0-������.txt is expected working.

The garbling of Chinese names is not to do with the
import/export, but the language locale support on the
server itself.

behatnotneeded

Change-Id: I6184bd4857cc28545b10ada94a258ae86f808b8e

Revision history for this message
Mahara Bot (dev-mahara) wrote : A patch has been submitted for review

Patch for "19.04_STABLE" branch: https://reviews.mahara.org/9707

Revision history for this message
Mahara Bot (dev-mahara) wrote : A change has been merged

Reviewed: https://reviews.mahara.org/9707
Committed: https://git.mahara.org/mahara/mahara/commit/59977847057f28518263fa97d85814a8236a169f
Submitter: Robert Lyon (<email address hidden>)
Branch: 19.04_STABLE

commit 59977847057f28518263fa97d85814a8236a169f
Author: Kevin Dibble <email address hidden>
Date: Wed Mar 27 15:43:32 2019 +1300

Bug 1184947 : Chinese names of files when exporting

The only issue found when looking into this bug
is the directory name reported is not set.
it was using the variable $todir but the actual
directory name is in the variable $to.

On the Chinese character issue: this is server side:
When creating a leap2a export - the file name gets
appended with an id. This is expected behaviour as
without this id before the file name, the leap 2a cannot
be re-imported.

So the 0-������.txt is expected working.

The garbling of Chinese names is not to do with the
import/export, but the language locale support on the
server itself.

behatnotneeded

Change-Id: I6184bd4857cc28545b10ada94a258ae86f808b8e
(cherry picked from commit 39bf115954bd822ac432968cdbad51d4fabdc6fe)

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.