Saving a file with non-English letters is not saved with correct name

Bug #769736 reported by grofaty
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Pinta
Fix Released
High
Unassigned

Bug Description

Pinta 0.8 on Windows XP sp3.
1. Draw something.
2. Save a image, etc. <Ctrl>+S.
3. In Name field of Save Image File dialog write some non-English letters.
4. File is saved but the name is totally incorrect.

P.S. Opening such a file produces an error described in bug 684239.

Tags: windows
Revision history for this message
grofaty (grofaty) wrote :
Revision history for this message
grofaty (grofaty) wrote :

I have installed Pinta 1.0 on Windows XP sp3 and problem still persists.

But incorrectly named files can now be opened (bug 684239 is fixed).

Revision history for this message
grofaty (grofaty) wrote :

I have installed Pinta 1.1 on Windows XP sp3 and problem still persists.

Revision history for this message
grofaty (grofaty) wrote :

I have installed Pinta 1.2 on Windows sp3 and latest development on Ubuntu 11.10 and problem still persists - naming looking into Windows Explorer revels #1 problem.

Revision history for this message
Cameron White (cameronwhite91) wrote :

Is this a Windows-only issue for you?

Revision history for this message
Robert Nordan (rpvn) wrote :

So, if you save to a file in a folder with cyrrillic letters, you get Bug #779427, but if you save to a latin letter folder with a cyrrillic name, you get this bug. Worth remembering when fixing these bugs. :P

Revision history for this message
grofaty (grofaty) wrote :

Cameron, yes it looks like a Windows specific. It appears in Pinta 1.2 on Windows XP sp3, but it doesn't appear in latest development on Ubuntu 11.10.

Changed in pinta:
importance: Undecided → High
status: New → Confirmed
tags: added: windows
Revision history for this message
Max Lyashuk aka Ma)(imuM (probel) wrote :

I know how to kill this bug and bug #779427, but I have some trouble with run compiled Pinta from git.

I copy cyrrillic name+path from the error and try to detect encoding(see attachment).
I think, changing encoding for windows from utf-8 to win-1251 solve the problem.

P.S. How to change encoding for string variable http://goo.gl/E6JaJ

Revision history for this message
grofaty (grofaty) wrote :

I have tested Pinta v1.4 on Windows XP and problem still persists. Reproduced like in bug report. If image in Pinta is saved with non-English letters then file is not saved correctly (you can check the Windows Explorer to see incorrect file name).

Opening such a file without a problem, but file-name is corrupted (because of Pinta saving image has produced incorrect file-name).

Also tested in Pinta v1.4 on Ubuntu 12.04 and no problem. So this bug is Windows specific.

At #8, I am sceptical about setting win-1251 code page instead of utf-8. Users around the word are using different code-pages not just win-1251, so this can mean (I am guessing) some non-English letter could be written successfully and some not.

Revision history for this message
grofaty (grofaty) wrote :

Just a note, if I remember correctly I have read somewhere in the web that Windows saves files in UTF-16 code page format (I could be wrong).

Revision history for this message
bodicsek (david-nabraczky+ubuntu) wrote :

I sent a pull request.
Please check.

Revision history for this message
Cameron White (cameronwhite91) wrote :
Changed in pinta:
milestone: none → 1.5
status: Confirmed → Fix Committed
Revision history for this message
grofaty (grofaty) wrote :

I tested pinta-1.5-preview-20130518 on Windows XP and made several tests:
1. Save English file name in English directory: SUCCESSFUL
2. Save non-English file name in English directory: SUCCESSFUL
3. Save non-English file name in non-English directory: : SUCCESSFUL
Excellent, so this bug is finally fixed. I think very important bug for non-English users!

Revision history for this message
grofaty (grofaty) wrote :

Additional tests:
For #13 steps 1., 2. and 3. File | Open: SUCCESSFUL
Are files in Windows Explorer correctly displayed: SUCCESSFUL
Are names in Pinta's title bar correctly displayed: SUCCESSFUL

It looks everything is now working fine with non-English names. Excellent.

Changed in pinta:
status: Fix Committed → Fix Released
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.