| View previous topic :: View next topic |
| Author |
Message |
sakya
Joined: 28 Apr 2006 Posts: 190
|
Posted: Wed Apr 09, 2008 9:29 pm Post subject: Problem with non ascii filename |
|
|
Hi! :)
I'm trying to use fat.c (from pmplayer-advance) to read file with non ascii names.
All seems to work (I can read the name without the problems found using readdir() function) but I'm unable to correctly print the name to screen.
[filenames are: àèìòù, così and Perché]
Once I red the directory I try to output the names (I'm using OSLib):
| Code: | oslDrawString(0, 20 + 15 * i, finfo[i].longname);
oslDrawString(240, 20 + 15 * i, finfo[i].filename); |
I can see the difference: finfo[i].filename has all non ascii characters converted to the same sequence, while finfo[i].longname makes difference between characters.
The problem is I don't see the correct name on screen.
With OSLib I have no problem to print a string like "àèìòù" but the filenames have these characters "converted"
Do I have to write my own conversion function mapping all characters or there's a "standard" function to do this?
Can someone please help me?
Many thanks. :)
Ciaooo
Sakya |
|
| Back to top |
|
 |
PosX100
Joined: 15 Aug 2007 Posts: 98
|
Posted: Thu Apr 10, 2008 12:38 am Post subject: |
|
|
If you're using oft fonts(oslib fonts) , then probably that's the problem.
Try to print text without custom fonts(using debug screen) . |
|
| Back to top |
|
 |
sakya
Joined: 28 Apr 2006 Posts: 190
|
Posted: Thu Apr 10, 2008 12:59 am Post subject: |
|
|
Hi! :)
| PosX100 wrote: | If you're using oft fonts(oslib fonts) , then probably that's the problem.
Try to print text without custom fonts(using debug screen) . |
Thanks, I'll try, but I don't think this is the problem.
I have no problems displaying things like:
| Code: | | oslDrawString(0, 10, "àèìòù"); |
I think the problem is the string (is this ANSI?).
Ciaooo
Sakya |
|
| Back to top |
|
 |
PosX100
Joined: 15 Aug 2007 Posts: 98
|
Posted: Thu Apr 10, 2008 1:41 am Post subject: |
|
|
| Then you should try to create your own character map , and map each character based on index.. |
|
| Back to top |
|
 |
alexp
Joined: 17 Apr 2007 Posts: 39
|
Posted: Thu Apr 10, 2008 11:29 pm Post subject: |
|
|
i don't know how fat.c access files, but psp filesystem calls, like sceIoDread, has a strange way of returning non ASCII filenames and uses some Devctl eand ioctls calls too. You can take a look at my previous work a http://forums.ps2dev.org/viewtopic.php?t=8590.
This was valid under CF 3.40 OE, but i think it's still ok. |
|
| Back to top |
|
 |
|