Hi there,
I made a program that list directories files and subfolders. Now I have a problem with file names that contains characters in the range from 0x80 to 0xFF. sceIoDread don't return the correct file name. The function replaces these characters by two bytes: 0x81 0xA1, no matter the character value.
for example, the file:
"mão.ogg" (0x6D 0xE3 0x6F 0x2E 0x6F 0x67 0x67)
returns "m??o.ogg" (0x6D 0x81 0xA1 0x6F 0x2E 0x6F 0x67 0x67)
How can I list file names correctly??
Need help, problem with sceIoDread
problem with sceIoDread
No, you didn't understand. I already created my custom font, but sceIoDread always return the same value for the character (0x81 0xA1), no matter the character value.
-
- Posts: 43
- Joined: Mon Sep 10, 2007 9:32 am
sceIoDread problem
Thanks everybody for replying.
I can't map the characters in range from 0x80 to 0xFF, because all characters in that range are always converted to the same two byte value: 0x81 0xA1. I can't know witch character is. When I try to open the returned file name with sceIoOpen, everything goes fine. I have a problem to display the correct file name. No problem with my fonts, they can handle these characters.
Is there any other functions than sceIoDopen and sceIoDread to list directories contents? Is there any unicode version for these functions? Or is there a way to enable these characters in sceIoDread?
I can't map the characters in range from 0x80 to 0xFF, because all characters in that range are always converted to the same two byte value: 0x81 0xA1. I can't know witch character is. When I try to open the returned file name with sceIoOpen, everything goes fine. I have a problem to display the correct file name. No problem with my fonts, they can handle these characters.
Is there any other functions than sceIoDopen and sceIoDread to list directories contents? Is there any unicode version for these functions? Or is there a way to enable these characters in sceIoDread?
Hi, I've worked a lot with filesystem API, while trying to develop my own filesystem, i think that SceIoDread API is valid only for ASCII names, UTF-8 names have to be read using some special IoCtls and DevCtl, in this thread http://forums.ps2dev.org/viewtopic.php?t=8590 i've posted the code i've developed for my filesystem, maybe you can use it to understand how to forge your requests.
I saw your source, it's really cool. Later I'll take a more detailed look.alexp wrote:Hi, I've worked a lot with filesystem API, while trying to develop my own filesystem, i think that SceIoDread API is valid only for ASCII names, UTF-8 names have to be read using some special IoCtls and DevCtl, in this thread http://forums.ps2dev.org/viewtopic.php?t=8590 i've posted the code i've developed for my filesystem, maybe you can use it to understand how to forge your requests.