| View previous topic :: View next topic |
| Author |
Message |
botrops
Joined: 31 Aug 2007 Posts: 4
|
Posted: Fri Sep 14, 2007 6:02 am Post subject: Need help, problem with sceIoDread |
|
|
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?? |
|
| Back to top |
|
 |
dot_blank

Joined: 28 Sep 2005 Posts: 498 Location: Brasil
|
Posted: Fri Sep 14, 2007 6:26 am Post subject: |
|
|
you will have to create your own font for these
characters ...that is your first step
then you will have to convert to a format more easier
to handle like utf8 or ucs internally _________________ 10011011 00101010 11010111 10001001 10111010 |
|
| Back to top |
|
 |
botrops
Joined: 31 Aug 2007 Posts: 4
|
Posted: Fri Sep 14, 2007 9:15 am Post subject: 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. |
|
| Back to top |
|
 |
saulotmalo2
Joined: 10 Sep 2007 Posts: 43
|
Posted: Fri Sep 14, 2007 9:22 am Post subject: |
|
|
| i think you have to map the caracters because it is not reading them... could it be a codification problem? |
|
| Back to top |
|
 |
botrops
Joined: 31 Aug 2007 Posts: 4
|
Posted: Fri Sep 14, 2007 8:39 pm Post subject: 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? |
|
| Back to top |
|
 |
alexp
Joined: 17 Apr 2007 Posts: 39
|
Posted: Fri Sep 14, 2007 10:06 pm Post subject: |
|
|
| 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. |
|
| Back to top |
|
 |
botrops
Joined: 31 Aug 2007 Posts: 4
|
Posted: Sat Sep 15, 2007 2:13 am Post subject: |
|
|
| 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. |
I saw your source, it's really cool. Later I'll take a more detailed look. |
|
| Back to top |
|
 |
|