HFS+ CD and Greek characters in sprite names

Bugs will be moved here once resolved.

Post » Wed Nov 19, 2014 12:54 pm

Problem Description
I have created a project where assets that are saved on disk (e.g., sprites) are named in Greek. They contain accented characters as well. I then export for Node-Webkit and create a Hybrid CD (yes, a CD! but these are the specs I have). The CD contains:

  • An ISO9660/Joliet part for Windows that contains all files generated in the win32 export folder.
  • An HFS+ part that contains all files generated in the osx export folder.

The CD works perfectly on Windows and the application starts correctly. The CD is recognized in OSX, the application starts but never finishes loading.

The problem is the accented characters, that in HFS+ are represented in their decomposed form, but Node-Webkit tries to load them in their normal UTF-8 form.

For example, the file 'αρχείο.png' is stored as 'αρχει´ο.png' in HFS+ but NW has a problem loading it.

This may be a problem with NW, but I would really like to have had a warning when I started, if there is no solution.

By the way, when I use a FAT32 formated USB drive and attach it to OSX, everything is fine. HFS+ is the problem.

Attach a Capx
TestwGreekChars.capx

Description of Capx
Shows a sprite.

Steps to Reproduce Bug
  • Export project
  • Choose Node-Webkit
  • Use a Hybrid CD creation program like Macimage
  • Add the win32 files in the ISO part, osx files in the HFS part
  • Mount the image or the resulting CD in OSX
  • Start the application

Observed Result
Application starts loading and hangs.

Expected Result
Application should load and display a sprite.

Affected Browsers
  • Node-Webkit: YES
  • FireFox: N/A
  • Internet Explorer: N/A

Operating System and Service Pack
Windows 7 64

Construct 2 Version ID
Construct 2 r184
You do not have the required permissions to view the files attached to this post.
B
5
S
1
Posts: 14
Reputation: 328

Post » Wed Nov 19, 2014 1:12 pm

Hi makebelieve. Could you rename the assets?
Image
B
9
S
3
G
1
Posts: 346
Reputation: 1,560

Post » Wed Nov 19, 2014 5:50 pm

Well, yes I could rename all sprites, sounds, music, xml, and json files. There are 305 of them though :(

Would be nice to either have a warning or a workaround.

NW needs all these files in one zip file for Windows and Linux but for some reason needs them unpacked in a folder for OSX.
B
5
S
1
Posts: 14
Reputation: 328

Post » Wed Nov 19, 2014 11:16 pm

I once had a project with hundreds of files that needed renaming in multiple folders. In the end I used a batch file to process the lot for me. Took a few seconds to run, but didn't make any mistakes. Unfortunately I don't have the batch file anymore but you might find something online that'll do the job for you. Obviously you only want to run the batch file on a backup set of files or else it could go badly wrong!
Image
B
9
S
3
G
1
Posts: 346
Reputation: 1,560

Post » Thu Nov 20, 2014 12:14 am

I think it's generally a good idea to stick to ASCII when naming files or you will run into problems, not every software developer is thinking about how to set things up to work with foreign languages and every possible file system, it'd be like complaining something doesn't work properly on an Amiga's file system.

CD's are old and largely obsolete media, and the only real answer is to be more careful mixing new standards with old standards. forward compatibility is tricky and there's always going to be unavoidable issues.
B
79
S
13
G
8
Posts: 1,977
Reputation: 9,947

Post » Thu Nov 20, 2014 7:49 am

hundredfold wrote:In the end I used a batch file to process the lot for me.


It's not just renaming, it's also changing the references in the event sheets, etc.

I know how to use a find with egrep, mv, and sed, but still. :cry:
B
5
S
1
Posts: 14
Reputation: 328

Post » Thu Nov 20, 2014 7:58 am

QuaziGNRLnose wrote:CD's are old and largely obsolete media, and the only real answer is to be more careful mixing new standards with old standards. forward compatibility is tricky and there's always going to be unavoidable issues.


But it's not the CD (which is obsolete, but not exactly), it's HFS+ (which is very current as it is OSX's native fs) and the way it supports UTF-8. I bet that if I put the files on a HFS+ formatted usb stick (instead of FAT32) I would have the same problem. I have to work on Windows and transfer the files from Windows to OSX, thus the problem.

I think it's basically the way NW is set up for OSX. If all files were in a zip file instead of flat out in a folder, HFS+ would not be an issue. But I guess there is a reason for that.

Sigh! I'll do the renames with a script. :ugeek:
B
5
S
1
Posts: 14
Reputation: 328

Post » Thu Nov 20, 2014 9:29 am

I found a workaround though!

OSX Node-Webkit does support packing all files in Resources/app.nw file instead of having them in the Resources/app.nw/ folder.

https://github.com/rogerwang/node-webki ... -your-apps

Moving the files to OSX via FAT32, packing them with zip, moving them back to Windows, and creating the hybrid CD, works perfectly.

If only this could be done when generating the apps from Construct 2, it would save the round-trip to my Virtualbox Hackintosh!
B
5
S
1
Posts: 14
Reputation: 328

Post » Thu Nov 20, 2014 4:29 pm

I don't think this is a Construct 2 issue: as you have basically identified yourself it appears to be a problem with either Node-webkit, OS X or HFS+. Construct 2 uses unicode support throughout, as well as the standard unicode-aware Windows APIs when writing and copying files, so I'm not sure what we could change there. Sometimes people raise similar issues where misconfigured web servers use some different characterset and mangle UTF-8 filenames, then return 404 not found. I'm not sure to what extent it's Construct 2's responsibility to solve that.

Sticking to ASCII names sucks for non-English people, but is a pragmatic way to avoid these problems. You say the zip trick works too, but note that it could increase the loading time of the application (since it must first decompress the zip).
Scirra Founder
B
399
S
236
G
89
Posts: 24,546
Reputation: 195,436


Return to Closed bugs

Who is online

Users browsing this forum: No registered users and 3 guests