Slacko 5.6 can't handle non UTF-8 file names

Please post any bugs you have found
Post Reply
Message
Author
Wilhelm
Posts: 7
Joined: Sun 29 Dec 2013, 16:07
Location: Costa Rica

Slacko 5.6 can't handle non UTF-8 file names

#1 Post by Wilhelm »

Hi:
This new puppy hasn't been taught the trick to use non UTF-8 files or directories.
So, if you have file or directories with names in anything but English, you will not be able to work with them (you can open them, but you can't save your changes).
Multilingual users, Slacko 5.5 is still the best puppy for you (older dogs tend to love us more). :)

User avatar
MochiMoppel
Posts: 2084
Joined: Wed 26 Jan 2011, 09:06
Location: Japan

#2 Post by MochiMoppel »

I created these files in Slacko 5.6. Looks fine to me
Attachments
NonASCII.png
(17.79 KiB) Downloaded 579 times

Wilhelm
Posts: 7
Joined: Sun 29 Dec 2013, 16:07
Location: Costa Rica

I was using the non-PAE version.

#3 Post by Wilhelm »

I forgot to mention that I was using the non-PAE version.
Did you use the PAE version for your test?

npierce
Posts: 858
Joined: Tue 29 Dec 2009, 01:40

#4 Post by npierce »

Wilhelm,

When you use ROX-Filer to look at the directory that has the troublesome names in it, are the names displayed in red or in black?
Wilhelm wrote:. . . (you can open them, but you can't save your changes).
I'd like to try an reproduce this problem. What application shows that behaviour?

User avatar
MochiMoppel
Posts: 2084
Joined: Wed 26 Jan 2011, 09:06
Location: Japan

Re: I was using the non-PAE version.

#5 Post by MochiMoppel »

Wilhelm wrote:Did you use the PAE version for your test?
No.

Wilhelm
Posts: 7
Joined: Sun 29 Dec 2013, 16:07
Location: Costa Rica

ROX filer show names with special characters in red

#6 Post by Wilhelm »

Hi:
I have been working with the previous puppy, and haven't checked this forum in a while. Sorry for the delay.

ROX filer showed directory and file names in red when they contained special characters.

Next time I travel to my parent's home, where I use the T-40 Thinkpad with Slacko puppy, I will attach a screen shot. Currently, I am working with other machine that uses Linux Mint. Slacko is awesome to keep those old computers productive! :D

npierce
Posts: 858
Joined: Tue 29 Dec 2009, 01:40

#7 Post by npierce »

If you run quickcountry or quicksetup is the UTF-8 encoding checkbox ticked or not?

(I don't have Slacko 5.6, but I am assuming that it still has quickcountry and/or quicksetup. Please correct me if I am wrong.)


It sounds like the problem is not that special characters (é, ã, ç, ñ, ß) can't be used, but that the filenames are in a different encoding, probably 8859-1 in your case, not UTF-8. The files were probably created at a time you were not using UTF-8, which was the default for Puppies until recent years (the UTF-8 encoding checkbox was not ticked when quicksetup was run). Or perhaps they were created with a different distro which didn't use UTF-8.

So that we can see how the names are encoded, please post the output from this command, substituting question marks for the non-ASCII characters in the names of the file or directory path. For instance, if the file is in the /root/my-documents/ directory, and name of the file is "test_éãçñß", enter this command:

Code: Select all

ls /root/my-documents/test_????? | hexdump -C
For example, the output will look something like this:

Code: Select all

# ls /root/my-documents/test_????? | hexdump -C
00000000  2f 72 6f 6f 74 2f 6d 79  2d 64 6f 63 75 6d 65 6e  |/root/my-documen|
00000010  74 73 2f 74 65 73 74 5f  e9 e3 e7 f1 df 0a        |ts/test_......|
0000001e
# 
If this is just an encoding problem, correcting it is not hard. Using ROX-Filer, put your pointer on the filename. Notice that ROX-Filer will say: "This filename is not valid UTF-8. You should rename it." Well, you don't actually need to rename it. That is, you can keep the same name using all of the same characters; you just have to re-encode it in UTF-8. How to do that? ROX-Filer makes it simple. Right-click on the file and choose Rename... from the menu. If the old encoding was 8859-1, the Rename window that pops up will probably already show the correct characters in the name. Simply click Rename. The filename will be re-encoded in UTF-8, and no longer appear in red.

Of course, once you have changed the name, you will need to continue to use UTF-8. If you have another Puppy in which you didn't tick the UTF-8 encoding checkbox when you first configured it, you will need to run quickcountry or quicksetup and tick that box the next time you use the other Puppy with these files.


Alternatively, you could continue to use the old encoding. That way you wouldn't need to re-encode the file name. You would just need to run quickcountry or quicksetup once in Slacko 5.6 and untick the UTF-8 encoding checkbox. But in our increasingly connected world, you'd be better off switching to UTF-8, as the old 8859-* encodings are used by fewer and fewer people as the years go by, since UTF-8 supports so many more characters than any single 8859-* encoding.


(Note that we are just discussing the names of files here. If the file is a text file and the actual text in the file has a different encoding, you may run into issues there as well. But many modern text editors, like geany, will let you choose the encoding to read or save a file. (In geany it is Document -> Set Encoding).)

Wilhelm
Posts: 7
Joined: Sun 29 Dec 2013, 16:07
Location: Costa Rica

Problem solved! Thanks a lot!

#8 Post by Wilhelm »

Wow, thanks a lot! :shock:

I made sure the UTF-8 box in "Ajuste Rápido de País" (quick country, in Spanish) was checked, and I will take note of your instructions for future reference.

I was working with a save file created in Slacko 5.5 when I experienced the problem, and I had noticed that a few settings were lost it conversion: Desktop background and desktop icons were replaced with defaults for 5.6. I changed them, but I never thought of making sure the UTF-8 box in "Ajuste Rápido de País" was checked!

I also noticed that 5.6 correctly reads special characters in file names when you do not load the save file (using just CD defaults). But, somehow, when I loaded my converted save file, things did not work exactly as intended.

I wonder if this has anything to do with the "pet" file I installed to translate menu items into Spanish, or it just happens when you convert a save file created with a previous puppy. :?:

Thanks again for all your help :!:

npierce
Posts: 858
Joined: Tue 29 Dec 2009, 01:40

#9 Post by npierce »

You're welcome.

As for that .pet file, I'm not familiar with it, but it is certainly possible that it had something to do with the change you saw. Probably not, though.

Post Reply